diff --git a/oneshot/update-pvc-cluster.yml b/oneshot/update-pvc-cluster.yml index 337a89c..9cb50b0 100644 --- a/oneshot/update-pvc-cluster.yml +++ b/oneshot/update-pvc-cluster.yml @@ -1,4 +1,14 @@ --- +- hosts: all + remote_user: deploy + become: yes + become_user: root + gather_facts: yes + tasks: + - name: set PVC maintenance mode + command: pvc maintenance on + run_once: yes + - hosts: all remote_user: deploy become: yes @@ -6,9 +16,6 @@ gather_facts: yes serial: 1 tasks: - - name: set PVC maintenance mode - command: pvc maintenance on - - name: temporarily set norestart policy copy: dest: "/usr/sbin/policy-rc.d" @@ -199,11 +206,18 @@ command: systemctl reset-failed when: freshness.changed or kernelversion.changed - - name: unset PVC maintenance mode - command: pvc maintenance off - - name: wait 30 seconds for system to stabilize pause: seconds: 30 become: no connection: local + +- hosts: all + remote_user: deploy + become: yes + become_user: root + gather_facts: yes + tasks: + - name: unset PVC maintenance mode + command: pvc maintenance off + run_once: yes diff --git a/oneshot/update-pvc-daemons.yml b/oneshot/update-pvc-daemons.yml index 75ee680..5499971 100644 --- a/oneshot/update-pvc-daemons.yml +++ b/oneshot/update-pvc-daemons.yml @@ -1,4 +1,14 @@ --- +- hosts: all + remote_user: deploy + become: yes + become_user: root + gather_facts: yes + tasks: + - name: set PVC maintenance mode + command: pvc maintenance on + run_once: yes + - hosts: all remote_user: deploy become: yes @@ -6,9 +16,6 @@ gather_facts: yes serial: 1 tasks: - - name: set PVC maintenance mode - command: pvc maintenance on - - name: install latest PVC packages apt: update_cache: yes @@ -69,11 +76,18 @@ command: systemctl reset-failed when: packages.changed - - name: unset PVC maintenance mode - command: pvc maintenance off - - name: wait 15 seconds for system to stabilize pause: seconds: 15 become: no connection: local + +- hosts: all + remote_user: deploy + become: yes + become_user: root + gather_facts: yes + tasks: + - name: unset PVC maintenance mode + command: pvc maintenance off + run_once: yes