Browse Source

Merge "Provison/Unprovision instance network ports"

changes/74/770674/1
Zuul 3 months ago
committed by Gerrit Code Review
parent
commit
ae8332476b
2 changed files with 36 additions and 0 deletions
  1. +25
    -0
      tripleo_ansible/playbooks/cli-overcloud-node-provision.yaml
  2. +11
    -0
      tripleo_ansible/playbooks/cli-overcloud-node-unprovision.yaml

+ 25
- 0
tripleo_ansible/playbooks/cli-overcloud-node-provision.yaml View File

@ -128,13 +128,38 @@
debug:
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
tripleo_baremetal_populate_environment:
environment: "{{ baremetal_instances.environment }}"
instances: "{{ baremetal_provisioned.instances + baremetal_existing.instances }}"
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 }}
copy:
dest: "{{ baremetal_deployed_path }}"
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)

+ 11
- 0
tripleo_ansible/playbooks/cli-overcloud-node-unprovision.yaml View File

@ -23,6 +23,7 @@
vars:
prompt: true
all: false
concurrency: 20
pre_tasks:
- fail:
msg: stack_name is a required input
@ -63,3 +64,13 @@
instances: "{{ baremetal_existing.instances }}"
state: absent
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…
Cancel
Save