Skip to content

Commit 043644b

Browse files
committed
Reboot hosts after fix-hostname changed
1 parent c4c531c commit 043644b

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

etc/kayobe/ansible/fix-hostname.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,9 @@
2121
cmd: hostnamectl set-hostname "{{ inventory_hostname }}"
2222
when: current_hostname.stdout != inventory_hostname
2323
become: true
24+
25+
- name: Reboot hosts
26+
import_playbook: "{{ playbook_dir | realpath }}/reboot.yml"
27+
vars:
28+
reboot_hosts: fix-hostname
29+
when: current_hostname.stdout != inventory_hostname

etc/kayobe/ansible/reboot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
- name: Reboot the host
3-
hosts: seed-hypervisor:seed:overcloud:infra-vms
3+
hosts: "{{ reboot_hosts | default('seed-hypervisor:seed:overcloud:infra-vms') }}"
44
serial: "{{ lookup('env', 'ANSIBLE_SERIAL') | default(1, true) }}"
55
gather_facts: false
66
vars:

0 commit comments

Comments
 (0)