2017-09-19 10:53:59 +00:00
|
|
|
---
|
|
|
|
- name: Save overcloud service configuration
|
|
|
|
hosts: overcloud
|
2017-12-19 14:42:18 +00:00
|
|
|
tags:
|
|
|
|
- service-config-save
|
2017-09-19 10:53:59 +00:00
|
|
|
vars:
|
|
|
|
# Override this to change the directory in which the configuration will be
|
|
|
|
# saved.
|
|
|
|
config_save_path: "{{ lookup('env', 'PWD') ~ '/overcloud-config' }}"
|
2017-09-20 09:30:37 +00:00
|
|
|
# Override this to change the directory on the remote hosts from which the
|
|
|
|
# kolla-ansible configuration will be saved.
|
|
|
|
node_config_directory: "/etc/kolla"
|
2017-09-19 10:53:59 +00:00
|
|
|
tasks:
|
|
|
|
- name: Find overcloud service configuration files
|
|
|
|
find:
|
2017-09-20 09:30:37 +00:00
|
|
|
paths: "{{ node_config_directory }}"
|
2017-09-19 10:53:59 +00:00
|
|
|
recurse: True
|
2019-01-09 09:55:34 +00:00
|
|
|
excludes: "{{ exclude_patterns | default(omit) }}"
|
|
|
|
patterns: "{{ include_patterns | default(omit) }}"
|
2017-09-19 10:53:59 +00:00
|
|
|
register: find_result
|
2018-08-17 12:12:44 +00:00
|
|
|
become: true
|
2017-09-19 10:53:59 +00:00
|
|
|
|
|
|
|
- name: Save overcloud service configuration
|
|
|
|
fetch:
|
|
|
|
src: "{{ item.path }}"
|
|
|
|
dest: "{{ config_save_path }}"
|
|
|
|
with_items: "{{ find_result.files }}"
|
2018-08-17 12:12:44 +00:00
|
|
|
become: true
|
|
|
|
loop_control:
|
|
|
|
label: "{{ item.path }}"
|