From 15fc3261de26b29b1b50d672dfc4371352575924 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Fri, 1 Dec 2023 01:37:39 -0500 Subject: [PATCH] Add PVC role tasks to update-pvc-daemons Ensures that configurations are always updated whenever the daemons are. This will be necessary for 0.9.83 with the fundamental change from pvcXd.yaml to pvc.conf configuration formats, while also ensuring that future daemon updates also include any configuration changes that may be pending in the group_vars. --- oneshot/update-pvc-daemons.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/oneshot/update-pvc-daemons.yml b/oneshot/update-pvc-daemons.yml index b6e7208..e175acb 100644 --- a/oneshot/update-pvc-daemons.yml +++ b/oneshot/update-pvc-daemons.yml @@ -1,4 +1,5 @@ --- +# Set the cluster into maintenance mode - hosts: all remote_user: deploy become: yes @@ -15,6 +16,28 @@ run_once: yes ignore_errors: yes +# Run the PVC daemon role against the system (update pvc.conf) +- hosts: all + remote_user: deploy + become: yes + become_user: root + gather_facts: yes + tasks: + - set_fact: + this_node: "{{ inventory_hostname.split('.')[0] }}" + + - set_fact: + is_coordinator: "{% for node in pvc_nodes if node.hostname == this_node %}{{ node.is_coordinator }}{% endfor %}" + + - set_fact: + new_host: no + + - name: import PVC daemon role + include_role: + name: pvc + tasks_from: pvc/main.yml + +# Install the latest PVC packages & restart daemons to apply - hosts: all remote_user: deploy become: yes @@ -92,6 +115,7 @@ become: no connection: local +# Set the cluster out of maintenance mode - hosts: all remote_user: deploy become: yes