Copy inventory to AnsibleRunner dir
Copy the existing tripleo-ansible-inventory.yaml to an AnsibleRunner friendly location so we can drop the inventory parameter when running AnsibleRunner Depends-On: https://review.opendev.org/c/openstack/tripleo-common/+/798153 Change-Id: I9e9f9f4e38476d070cac038600f9856cab070787
This commit is contained in:
parent
ed12f344a3
commit
aa3209f2a5
|
@ -52,3 +52,18 @@
|
|||
ansible_python_interpreter: "{{ python_interpreter }}"
|
||||
ansible_ssh_private_key_file: "{{ ansible_ssh_private_key_file }}"
|
||||
when: inventory_path is not defined or inventory_path != None
|
||||
|
||||
# TODO(mwhahaha): switch tripleo_generate_ansible_inventory to do this
|
||||
# when we've nuked all the tripleo-ansible-inventory.yaml everywhere
|
||||
- name: Copy inventory to AnsibleRunner location
|
||||
block:
|
||||
- name: Create inventory directory
|
||||
ansible.builtin.file:
|
||||
path: "{{ output_dir ~ '/' ~ plan }}/inventory"
|
||||
state: directory
|
||||
mode: 0700
|
||||
- name: Copy generated inventory
|
||||
ansible.builtin.copy:
|
||||
src: "{{ work_dir }}/tripleo-ansible-inventory.yaml"
|
||||
dest: "{{work_dir }}/inventory/tripleo"
|
||||
remote_src: true
|
||||
|
|
Loading…
Reference in New Issue