From 0353f1f6a221ce1e29677cb2afd96d6a7ab1dac1 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Wed, 4 Apr 2018 19:20:24 +0000 Subject: [PATCH] fix up vhost_update to not swamp noc01 and cause unreachables --- playbooks/vhost_update.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/playbooks/vhost_update.yml b/playbooks/vhost_update.yml index eece3fd51a..fb5afeda2b 100644 --- a/playbooks/vhost_update.yml +++ b/playbooks/vhost_update.yml @@ -21,12 +21,14 @@ # Call out to another playbook. Disable any proxies that may live here #- include_playbook: update-proxy-dns.yml status=disable proxies=myvms_new:&proxies -- name: update the system +- name: set downtime hosts: "{{ target }}:myvms_new" - gather_facts: True + gather_facts: False user: root + serial: 1 tasks: + - name: schedule regular host downtime nagios: action=downtime minutes=30 service=host host={{ inventory_hostname_short }}{{ env_suffix }} delegate_to: noc01.phx2.fedoraproject.org @@ -34,6 +36,12 @@ failed_when: no when: nonagios is not defined or not "true" in nonagios +- name: update the system + hosts: "{{ target }}:myvms_new" + gather_facts: True + user: root + + tasks: - name: expire-caches command: yum clean expire-cache when: ansible_distribution_major_version|int < 22