kayobe/ansible/overcloud-service-config-save.yml

31 lines
1000 B
YAML
Raw Normal View History

2017-09-19 10:53:59 +00:00
---
- name: Save overcloud service configuration
hosts: overcloud
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' }}"
# 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:
paths: "{{ node_config_directory }}"
2017-09-19 10:53:59 +00:00
recurse: True
excludes: "{{ exclude_patterns | default(omit) }}"
patterns: "{{ include_patterns | default(omit) }}"
2017-09-19 10:53:59 +00:00
register: find_result
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 }}"
become: true
loop_control:
label: "{{ item.path }}"