Align tasks between config-download playbooks
cli-config-download.yaml and cli-config-download-export.yaml both
download the config from the stack. This commit aligns the tasks between
the 2 so that they both setup and download the config in the same way.
This allows a single playbook to be used by tripleoclient
(cli-config-download.yaml) as done in
Ia765c2c2ea548a1dcd20f592eda8741f40a1cf16
cli-config-download-export.yaml will be removed in a subsequent patch as
it will no longer be used by tripleoclient.
Change-Id: Ie47abe2d7c5d7891aceb88d9008d45d7922dea15
Signed-off-by: James Slagle <jslagle@redhat.com>
(cherry picked from commit b6f1bfc408
)
This commit is contained in:
parent
c206ed605c
commit
42cc78dd62
|
@ -26,6 +26,8 @@
|
||||||
ansible_ssh_user: tripleo-admin
|
ansible_ssh_user: tripleo-admin
|
||||||
ansible_ssh_private_key_file: /home/stack/.ssh/id_rsa
|
ansible_ssh_private_key_file: /home/stack/.ssh/id_rsa
|
||||||
python_interpreter: null
|
python_interpreter: null
|
||||||
|
config_type: null
|
||||||
|
preserve_config: true
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: Set output_dir
|
- name: Set output_dir
|
||||||
|
@ -37,11 +39,23 @@
|
||||||
set_fact:
|
set_fact:
|
||||||
work_dir: "{{ output_dir ~ '/' ~ plan }}"
|
work_dir: "{{ output_dir ~ '/' ~ plan }}"
|
||||||
|
|
||||||
|
- name: Clean work_dir
|
||||||
|
file:
|
||||||
|
path: "{{ work_dir }}"
|
||||||
|
state: absent
|
||||||
|
when: not preserve_config | bool
|
||||||
|
|
||||||
|
- name: Create config dir if does not exist
|
||||||
|
file:
|
||||||
|
path: "{{ work_dir }}"
|
||||||
|
state: directory
|
||||||
|
|
||||||
- name: Download config
|
- name: Download config
|
||||||
tripleo_config_download:
|
tripleo_config_download:
|
||||||
plan: "{{ plan }}"
|
plan: "{{ plan }}"
|
||||||
work_dir: "{{ work_dir }}"
|
work_dir: "{{ work_dir }}"
|
||||||
download: true
|
download: true
|
||||||
|
config_type: "{{ config_type }}"
|
||||||
|
|
||||||
- name: Generate ansible inventory
|
- name: Generate ansible inventory
|
||||||
tripleo_generate_ansible_inventory:
|
tripleo_generate_ansible_inventory:
|
||||||
|
|
Loading…
Reference in New Issue