node provision, generate ansible inventory
Generate an ansible inventory from neutron resource information when network port management is enabled in the overcloud node provision cli workflow. Partial-Implements: blueprint network-data-v2-ports Depends-On: https://review.opendev.org/771291 Depends-On: https://review.opendev.org/771292 Change-Id: I7737f9fc5104b769ef78b76e20a019cc1dafba8f
This commit is contained in:
parent
34e324638c
commit
db36cf0b8f
|
@ -141,7 +141,8 @@ def run_module():
|
||||||
python_interpretor,
|
python_interpretor,
|
||||||
ssh_user,
|
ssh_user,
|
||||||
ssh_private_key_file,
|
ssh_private_key_file,
|
||||||
ssh_network)
|
ssh_network,
|
||||||
|
conn.session)
|
||||||
result['inventory_path'] = inventory_path
|
result['inventory_path'] = inventory_path
|
||||||
result['success'] = True
|
result['success'] = True
|
||||||
result['changed'] = True
|
result['changed'] = True
|
||||||
|
|
|
@ -23,6 +23,9 @@
|
||||||
vars:
|
vars:
|
||||||
node_timeout: 3600
|
node_timeout: 3600
|
||||||
concurrency: 20
|
concurrency: 20
|
||||||
|
ssh_network: ctlplane
|
||||||
|
python_interpreter: null
|
||||||
|
ssh_private_key_file: /home/stack/.ssh/id_rsa
|
||||||
|
|
||||||
pre_tasks:
|
pre_tasks:
|
||||||
- fail:
|
- fail:
|
||||||
|
@ -172,3 +175,20 @@
|
||||||
dest: "{{ baremetal_deployed_path }}"
|
dest: "{{ baremetal_deployed_path }}"
|
||||||
content: "{{ network_ports_environment.environment | default({}) | to_nice_yaml(indent=2) }}"
|
content: "{{ network_ports_environment.environment | default({}) | to_nice_yaml(indent=2) }}"
|
||||||
when: manage_network_ports|default(false)
|
when: manage_network_ports|default(false)
|
||||||
|
|
||||||
|
- name: Ensure inventory working directory exists
|
||||||
|
file:
|
||||||
|
path: "{{ output_dir }}/{{ stack_name }}"
|
||||||
|
state: directory
|
||||||
|
when:
|
||||||
|
- manage_network_ports|default(false)
|
||||||
|
|
||||||
|
- name: Generate ansible inventory
|
||||||
|
tripleo_generate_ansible_inventory:
|
||||||
|
plan: "{{ stack_name }}"
|
||||||
|
work_dir: "{{ output_dir }}/{{ stack_name }}"
|
||||||
|
ssh_network: "{{ ssh_network }}"
|
||||||
|
ansible_ssh_user: "{{ ssh_user_name }}"
|
||||||
|
ansible_python_interpreter: "{{ python_interpreter }}"
|
||||||
|
ansible_ssh_private_key_file: "{{ ssh_private_key_file }}"
|
||||||
|
when: manage_network_ports|default(false)
|
||||||
|
|
Loading…
Reference in New Issue