migrate all the script-like playbooks such that the primary host-spec is the same variable: $target
This commit is contained in:
parent
4c8fa880e8
commit
1af0b3eb8b
4 changed files with 13 additions and 13 deletions
|
@ -1,7 +1,7 @@
|
||||||
# requires --extra-vars="hosts=hostspec"
|
# requires --extra-vars="target=hostspec"
|
||||||
|
|
||||||
- name: reboot hosts
|
- name: reboot hosts
|
||||||
hosts: $hosts
|
hosts: $target
|
||||||
user: root
|
user: root
|
||||||
serial: 1
|
serial: 1
|
||||||
|
|
||||||
|
|
|
@ -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
|
- name: update all run rkhunter if installed
|
||||||
hosts: $hostlist
|
hosts: $target
|
||||||
user: root
|
user: root
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# requires --extra-vars="vhost=somevhost fqdn"
|
# requires --extra-vars="target=somevhost fqdn"
|
||||||
|
|
||||||
#General overview:
|
#General overview:
|
||||||
# talk to the vhost
|
# talk to the vhost
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
|
|
||||||
- name: find instances
|
- name: find instances
|
||||||
hosts: $vhost
|
hosts: $target
|
||||||
user: root
|
user: root
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
|
@ -57,7 +57,7 @@
|
||||||
|
|
||||||
|
|
||||||
- name: reboot vhost
|
- name: reboot vhost
|
||||||
hosts: $vhost
|
hosts: $target
|
||||||
user: root
|
user: root
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
|
@ -65,11 +65,11 @@
|
||||||
action: nagios action=silence host=${inventory_hostname_short}
|
action: nagios action=silence host=${inventory_hostname_short}
|
||||||
delegate_to: noc01.phx2.fedoraproject.org
|
delegate_to: noc01.phx2.fedoraproject.org
|
||||||
|
|
||||||
- name: halt -r the $vhost
|
- name: halt -r the $target
|
||||||
action: command /sbin/reboot
|
action: command /sbin/reboot
|
||||||
|
|
||||||
- name: wait for $vhost to come back - up to 6 minutes
|
- name: wait for $target to come back - up to 6 minutes
|
||||||
local_action: wait_for host=$vhost port=22 delay=120 timeout=420
|
local_action: wait_for host=$target port=22 delay=120 timeout=420
|
||||||
|
|
||||||
- name: tell nagios to unshush
|
- name: tell nagios to unshush
|
||||||
action: nagios action=unsilence host=${inventory_hostname_short}
|
action: nagios action=unsilence host=${inventory_hostname_short}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# requires --extra-vars="vhost=somevhostname yumcommand=update"
|
# requires --extra-vars="target=somevhostname yumcommand=update"
|
||||||
|
|
||||||
- name: find instances
|
- name: find instances
|
||||||
hosts: $vhost
|
hosts: $target
|
||||||
user: root
|
user: root
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
with_items: ${vmlist.list_vms}
|
with_items: ${vmlist.list_vms}
|
||||||
|
|
||||||
- name: update all run rkhunter if installed
|
- name: update all run rkhunter if installed
|
||||||
hosts: $vhost;myvms_new
|
hosts: $target;myvms_new
|
||||||
user: root
|
user: root
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue