virtualbmc setup is not working in devmode.sh
Some workflows like devmode will not have facts collected on the virthost e.g. devmode.sh. This occurs when quickstart.sh is invoked multiple times. Do not rely on facts to get the uuid of the non_root_user, instead delegate to the virthost and get the uuid and set a fact. Closes-Bug: #1657248 Change-Id: I5d087983b1794c10c311bc44b162428c2cc7e476
This commit is contained in:
parent
ba359352ce
commit
62cf304ede
|
@ -8,10 +8,23 @@
|
|||
use: yum
|
||||
become: true
|
||||
|
||||
# the non_root_user id is not in the facts of the virthost when
|
||||
# executed in devmode. To be safe let's delegate to the virthost
|
||||
# and obtain the uuid of the non_root_user
|
||||
- name: get virthost non_root_user userid
|
||||
shell: id -u {{ non_root_user }}
|
||||
register: non_root_user_uid
|
||||
delegate_to: virthost
|
||||
|
||||
- name: set fact on non_root_user_uid
|
||||
set_fact:
|
||||
non_root_user_uid: "{{ non_root_user_uid.stdout }}"
|
||||
|
||||
- name: Create the Virtual BMCs
|
||||
when: release not in ['liberty', 'mitaka', 'newton']
|
||||
command: >
|
||||
vbmc add {{item.name}} --port {{item.virtualbmc_port}} --libvirt-uri "qemu+ssh://{{ non_root_user }}@{{ networks[0].address }}/session?socket=/run/user/{{ hostvars[groups['virthost'][0]].non_root_user_uid }}/libvirt/libvirt-sock&keyfile=/root/.ssh/id_rsa_virt_power&no_verify=1&no_tty=1"
|
||||
vbmc add {{item.name}} --port {{item.virtualbmc_port}} --libvirt-uri
|
||||
"qemu+ssh://{{ non_root_user }}@{{ networks[0].address }}/session?socket=/run/user/{{ non_root_user_uid }}/libvirt/libvirt-sock&keyfile=/root/.ssh/id_rsa_virt_power&no_verify=1&no_tty=1"
|
||||
with_items: "{{ overcloud_nodes }}"
|
||||
become: true
|
||||
become_user: root
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
dependencies:
|
||||
- extras-common
|
Loading…
Reference in New Issue