Skip to content

Commit c59a665

Browse files
committed
Mark reboot required after bootc update
After a bootc update (switch), mark a reboot as required, so that the edpm_reboot role will reboot the node (if the role is included). Signed-off-by: James Slagle <[email protected]>
1 parent 6cca699 commit c59a665

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

roles/edpm_update/tasks/bootc.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,21 @@
2020
become: true
2121
register: bootc_result
2222
changed_when: bootc_result.rc != 0
23+
24+
- name: Create directory required by edpm-reboot role
25+
become: true
26+
ansible.builtin.file:
27+
path: /var/lib/openstack/reboot_required/
28+
state: directory
29+
mode: "0755"
30+
when:
31+
- bootc_result.changed
32+
33+
- name: Create required file to enforce a reboot
34+
become: true
35+
ansible.builtin.file:
36+
path: /var/lib/openstack/reboot_required/bootc_reboot
37+
state: touch
38+
mode: "0600"
39+
when:
40+
- bootc_result.changed

0 commit comments

Comments
 (0)