Adds option to skip overcloud nodes setup
When baremetal nodes are used, there is no need to set up virt nodes. This commit will skip setting up overcloud virt nodes if the overcloud_nodes variable is empty. The source of instackenv.json file is set as a variable so a ready file can be imported. Partial-Bug: 1571028 Change-Id: I41d315aa3eedbcea9f4841a5572b1c55f400d873
This commit is contained in:
parent
c4f451c440
commit
d62acadd4d
|
@ -18,3 +18,5 @@ libvirt_arch: x86_64
|
||||||
# how many times to try getting the undercloud ip
|
# how many times to try getting the undercloud ip
|
||||||
# address before giving up.
|
# address before giving up.
|
||||||
undercloud_ip_retries: 20
|
undercloud_ip_retries: 20
|
||||||
|
|
||||||
|
undercloud_instackenv_template: instackenv.json.j2
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
nodes: "{{ overcloud_nodes }}"
|
nodes: "{{ overcloud_nodes }}"
|
||||||
networks: "{{ networks }}"
|
networks: "{{ networks }}"
|
||||||
register: node_mac_map
|
register: node_mac_map
|
||||||
|
when: overcloud_nodes
|
||||||
|
|
||||||
- name: Ensure volume pool directory exists
|
- name: Ensure volume pool directory exists
|
||||||
file:
|
file:
|
||||||
|
@ -38,6 +39,7 @@
|
||||||
environment:
|
environment:
|
||||||
LIBVIRT_DEFAULT_URI: "{{ libvirt_uri }}"
|
LIBVIRT_DEFAULT_URI: "{{ libvirt_uri }}"
|
||||||
with_items: "{{ overcloud_nodes }}"
|
with_items: "{{ overcloud_nodes }}"
|
||||||
|
when: overcloud_nodes
|
||||||
|
|
||||||
- name: Create overcloud vm storage
|
- name: Create overcloud vm storage
|
||||||
command: >
|
command: >
|
||||||
|
@ -48,6 +50,7 @@
|
||||||
LIBVIRT_DEFAULT_URI: "{{ libvirt_uri }}"
|
LIBVIRT_DEFAULT_URI: "{{ libvirt_uri }}"
|
||||||
when: item|failed
|
when: item|failed
|
||||||
with_items: "{{ overcloud_vol_check.results }}"
|
with_items: "{{ overcloud_vol_check.results }}"
|
||||||
|
when: overcloud_nodes
|
||||||
|
|
||||||
- name: Define overcloud vms
|
- name: Define overcloud vms
|
||||||
virt:
|
virt:
|
||||||
|
@ -56,8 +59,9 @@
|
||||||
xml: "{{ lookup('template', 'baremetalvm.xml.j2') }}"
|
xml: "{{ lookup('template', 'baremetalvm.xml.j2') }}"
|
||||||
uri: "{{ libvirt_uri }}"
|
uri: "{{ libvirt_uri }}"
|
||||||
with_items: "{{ overcloud_nodes }}"
|
with_items: "{{ overcloud_nodes }}"
|
||||||
|
when: overcloud_nodes
|
||||||
|
|
||||||
- name: Write instackenv script
|
- name: Write instackenv script
|
||||||
template:
|
template:
|
||||||
src: instackenv.json.j2
|
src: "{{ undercloud_instackenv_template }}"
|
||||||
dest: "{{ working_dir }}/instackenv.json"
|
dest: "{{ working_dir }}/instackenv.json"
|
||||||
|
|
Loading…
Reference in New Issue