migrate all the script-like playbooks such that the primary host-spec is the same variable: $target

This commit is contained in:
Seth Vidal 2013-03-04 22:37:13 +00:00
parent 4c8fa880e8
commit 1af0b3eb8b
4 changed files with 13 additions and 13 deletions

View file

@ -1,7 +1,7 @@
# requires --extra-vars="hosts=hostspec"
# requires --extra-vars="target=hostspec"
- name: reboot hosts
hosts: $hosts
hosts: $target
user: root
serial: 1

View file

@ -1,7 +1,7 @@
# requires --extra-vars="hostlist='host1;host2;group etc' yumcommand=update'"
# requires --extra-vars="target='host1;host2;group etc' yumcommand=update'"
- name: update all run rkhunter if installed
hosts: $hostlist
hosts: $target
user: root
tasks:

View file

@ -1,4 +1,4 @@
# requires --extra-vars="vhost=somevhost fqdn"
# requires --extra-vars="target=somevhost fqdn"
#General overview:
# talk to the vhost
@ -20,7 +20,7 @@
- name: find instances
hosts: $vhost
hosts: $target
user: root
tasks:
@ -57,7 +57,7 @@
- name: reboot vhost
hosts: $vhost
hosts: $target
user: root
tasks:
@ -65,11 +65,11 @@
action: nagios action=silence host=${inventory_hostname_short}
delegate_to: noc01.phx2.fedoraproject.org
- name: halt -r the $vhost
- name: halt -r the $target
action: command /sbin/reboot
- name: wait for $vhost to come back - up to 6 minutes
local_action: wait_for host=$vhost port=22 delay=120 timeout=420
- name: wait for $target to come back - up to 6 minutes
local_action: wait_for host=$target port=22 delay=120 timeout=420
- name: tell nagios to unshush
action: nagios action=unsilence host=${inventory_hostname_short}

View file

@ -1,7 +1,7 @@
# requires --extra-vars="vhost=somevhostname yumcommand=update"
# requires --extra-vars="target=somevhostname yumcommand=update"
- name: find instances
hosts: $vhost
hosts: $target
user: root
tasks:
@ -14,7 +14,7 @@
with_items: ${vmlist.list_vms}
- name: update all run rkhunter if installed
hosts: $vhost;myvms_new
hosts: $target;myvms_new
user: root
tasks: