Merge "Provison/Unprovision instance network ports"
This commit is contained in:
commit
ae8332476b
|
@ -128,13 +128,38 @@
|
||||||
debug:
|
debug:
|
||||||
var: baremetal_provisioned.logging
|
var: baremetal_provisioned.logging
|
||||||
|
|
||||||
|
- name: Provision instance network ports
|
||||||
|
tripleo_overcloud_network_ports:
|
||||||
|
stack_name: "{{ stack_name }}"
|
||||||
|
concurrency: "{{ runtime_concurrency }}"
|
||||||
|
instances: "{{ baremetal_instances.instances }}"
|
||||||
|
provisioned_instances: "{{ baremetal_provisioned.instances + baremetal_existing.instances }}"
|
||||||
|
state: present
|
||||||
|
register: instance_network_ports
|
||||||
|
when: manage_network_ports|default(false)
|
||||||
|
|
||||||
- name: Populate environment
|
- name: Populate environment
|
||||||
tripleo_baremetal_populate_environment:
|
tripleo_baremetal_populate_environment:
|
||||||
environment: "{{ baremetal_instances.environment }}"
|
environment: "{{ baremetal_instances.environment }}"
|
||||||
instances: "{{ baremetal_provisioned.instances + baremetal_existing.instances }}"
|
instances: "{{ baremetal_provisioned.instances + baremetal_existing.instances }}"
|
||||||
register: baremetal_environment
|
register: baremetal_environment
|
||||||
|
|
||||||
|
- name: Populate environment with network port data
|
||||||
|
tripleo_network_ports_populate_environment:
|
||||||
|
environment: "{{ baremetal_instances.environment }}"
|
||||||
|
role_net_map: "{{ baremetal_instances.role_net_map }}"
|
||||||
|
node_port_map: "{{ instance_network_ports.node_port_map }}"
|
||||||
|
register: network_ports_environment
|
||||||
|
when: manage_network_ports|default(false)
|
||||||
|
|
||||||
- name: Write environment to {{ baremetal_deployed_path }}
|
- name: Write environment to {{ baremetal_deployed_path }}
|
||||||
copy:
|
copy:
|
||||||
dest: "{{ baremetal_deployed_path }}"
|
dest: "{{ baremetal_deployed_path }}"
|
||||||
content: "{{ baremetal_environment.environment | default({}) | to_nice_yaml(indent=2) }}"
|
content: "{{ baremetal_environment.environment | default({}) | to_nice_yaml(indent=2) }}"
|
||||||
|
when: not manage_network_ports|default(false)
|
||||||
|
|
||||||
|
- name: Write environment to {{ baremetal_deployed_path }}
|
||||||
|
copy:
|
||||||
|
dest: "{{ baremetal_deployed_path }}"
|
||||||
|
content: "{{ network_ports_environment.environment | default({}) | to_nice_yaml(indent=2) }}"
|
||||||
|
when: manage_network_ports|default(false)
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
vars:
|
vars:
|
||||||
prompt: true
|
prompt: true
|
||||||
all: false
|
all: false
|
||||||
|
concurrency: 20
|
||||||
pre_tasks:
|
pre_tasks:
|
||||||
- fail:
|
- fail:
|
||||||
msg: stack_name is a required input
|
msg: stack_name is a required input
|
||||||
|
@ -63,3 +64,13 @@
|
||||||
instances: "{{ baremetal_existing.instances }}"
|
instances: "{{ baremetal_existing.instances }}"
|
||||||
state: absent
|
state: absent
|
||||||
when: not prompt|bool
|
when: not prompt|bool
|
||||||
|
|
||||||
|
- name: Unprovision instance network ports
|
||||||
|
tripleo_overcloud_network_ports:
|
||||||
|
stack_name: "{{ stack_name }}"
|
||||||
|
concurrency: "{{ concurrency }}"
|
||||||
|
instances: "{{ baremetal_instances.instances }}"
|
||||||
|
state: absent
|
||||||
|
when:
|
||||||
|
- not prompt|bool
|
||||||
|
- manage_network_ports|default(false)
|
||||||
|
|
Loading…
Reference in New Issue