Merge "Handle undercloud autostart dependant on ansible version"
This commit is contained in:
commit
3c2b0dd274
|
@ -302,21 +302,35 @@
|
|||
state: 'directory'
|
||||
when: non_root_chown|bool
|
||||
|
||||
# Start the undercloud virtual machine.
|
||||
# This block only run when ansible version < 2.3.
|
||||
- block:
|
||||
# Start the undercloud virtual machine.
|
||||
- name: Start undercloud vm
|
||||
virt:
|
||||
name: "{{ undercloud_node.name }}"
|
||||
command: start
|
||||
state: running
|
||||
uri: "{{ libvirt_uri }}"
|
||||
|
||||
# Configure the undercloud virtual machine to be
|
||||
# automatically started at boot.
|
||||
- name: Configure undercloud vm to start at virthost boot
|
||||
virt:
|
||||
name: "{{ undercloud_node.name }}"
|
||||
command: autostart
|
||||
uri: "{{ libvirt_uri }}"
|
||||
when: "{{ ansible_version.full | version_compare('2.3','<') }}"
|
||||
|
||||
# Start the undercloud virtual machine and make it
|
||||
# automatically start for ansible-version >= 2.3
|
||||
- name: Start undercloud vm
|
||||
virt:
|
||||
name: "{{ undercloud_node.name }}"
|
||||
command: start
|
||||
autostart: true
|
||||
state: running
|
||||
uri: "{{ libvirt_uri }}"
|
||||
|
||||
# Configure the undercloud virtual machine to be
|
||||
# automatically started at boot.
|
||||
- name: Configure undercloud vm to start at virthost boot
|
||||
virt:
|
||||
name: "{{ undercloud_node.name }}"
|
||||
command: autostart
|
||||
uri: "{{ libvirt_uri }}"
|
||||
when: "{{ ansible_version.full | version_compare('2.3','>=') }}"
|
||||
|
||||
# Get the ip address of the undercloud. This will retry several times
|
||||
# (`undercloud_ip_retries`) until the undercloud is ready. The script
|
||||
|
|
Loading…
Reference in New Issue