5a9872a9b9
Stage config files from openstack and all projects used by the devstack run. Change-Id: I99f1bc71856b0da7fc5b438d13d4f508d2341e44
25 lines
708 B
YAML
25 lines
708 B
YAML
- name: Ensure {{ stage_dir }}/etc exists
|
|
file:
|
|
path: "{{ stage_dir }}/etc"
|
|
state: directory
|
|
|
|
- name: Check which projects have a config folder
|
|
stat:
|
|
path: "/etc/{{ item.value.short_name }}"
|
|
with_dict: "{{ zuul.projects }}"
|
|
register: project_configs
|
|
|
|
- name: Copy configuration files
|
|
command: cp -pRL {{ item.stat.path }} {{ stage_dir }}/etc/{{ item.item.value.short_name }}
|
|
when: item.stat.exists
|
|
with_items: "{{ project_configs.results }}"
|
|
|
|
- name: Check if openstack has a config folder
|
|
stat:
|
|
path: "/etc/openstack"
|
|
register: openstack_configs
|
|
|
|
- name: Copy configuration files
|
|
command: cp -pRL /etc/openstack {{ stage_dir }}/etc/
|
|
when: openstack_configs.stat.exists
|