From 384ff623b957a8af529e30808233f1e819ceb59c Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Mon, 31 Mar 2014 19:32:04 +0000 Subject: [PATCH] This shouldn't be starts with, but find --- playbooks/vhost_reboot.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/playbooks/vhost_reboot.yml b/playbooks/vhost_reboot.yml index dd75a38b73..d3664573d4 100644 --- a/playbooks/vhost_reboot.yml +++ b/playbooks/vhost_reboot.yml @@ -43,13 +43,13 @@ nagios: action=downtime minutes=30 service=host host={{ inventory_hostname_short }} delegate_to: noc01.phx2.fedoraproject.org ignore_errors: true - when: not inventory_hostname.startswith('stg') + when: inventory_hostname.find('.stg.') == -1 - name: schedule stg host downtime nagios: action=downtime minutes=30 service=host host={{ inventory_hostname_short }}.stg delegate_to: noc01.phx2.fedoraproject.org ignore_errors: true - when: inventory_hostname.startswith('stg') + when: inventory_hostname.find('.stg.') != -1 - name: halt the vm instances - to poweroff command: /sbin/halt -p