d8fe45b3d8
Having tagged plays allows us to easily run a subset of the plays for a command, and perform targeted operations with less risk of unintended consequences. The tags are typically named after the playbook, although some of the overcloud playbooks have been tagged without an overcloud- prefix.
25 lines
791 B
YAML
25 lines
791 B
YAML
---
|
|
- name: Save overcloud service configuration
|
|
hosts: overcloud
|
|
tags:
|
|
- service-config-save
|
|
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"
|
|
tasks:
|
|
- name: Find overcloud service configuration files
|
|
find:
|
|
paths: "{{ node_config_directory }}"
|
|
recurse: True
|
|
register: find_result
|
|
|
|
- name: Save overcloud service configuration
|
|
fetch:
|
|
src: "{{ item.path }}"
|
|
dest: "{{ config_save_path }}"
|
|
with_items: "{{ find_result.files }}"
|