Skip to content

Commit b5bdd8a

Browse files
authored
Merge pull request #1257 from stackhpc/hook-hostname-fix
Add hooks for fixing hostname bug in Multinode for Caracal upgrade job
2 parents f693a52 + 043644b commit b5bdd8a

File tree

5 files changed

+12
-2
lines changed

5 files changed

+12
-2
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:
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../../../ansible/fix-hostname.yml

etc/kayobe/environments/ci-multinode/inventory/groups

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
controllers
66

77
[fix-hostname:children]
8-
storage
8+
overcloud
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
# Ensure that the reboot playbook is always executed using the boostrap user
3+
reboot_with_bootstrap_user: true

0 commit comments

Comments
 (0)