Andrea Frittoli (andreaf) | 5a9872a | 2017-12-15 13:55:50 +0000 | [diff] [blame] | 1 | - name: Ensure {{ stage_dir }}/etc exists |
| 2 | file: |
| 3 | path: "{{ stage_dir }}/etc" |
| 4 | state: directory |
| 5 | |
| 6 | - name: Check which projects have a config folder |
| 7 | stat: |
| 8 | path: "/etc/{{ item.value.short_name }}" |
| 9 | with_dict: "{{ zuul.projects }}" |
| 10 | register: project_configs |
Paul Belanger | d310672 | 2018-02-21 16:06:49 -0500 | [diff] [blame] | 11 | no_log: true |
Andrea Frittoli (andreaf) | 5a9872a | 2017-12-15 13:55:50 +0000 | [diff] [blame] | 12 | |
| 13 | - name: Copy configuration files |
| 14 | command: cp -pRL {{ item.stat.path }} {{ stage_dir }}/etc/{{ item.item.value.short_name }} |
| 15 | when: item.stat.exists |
| 16 | with_items: "{{ project_configs.results }}" |
| 17 | |
| 18 | - name: Check if openstack has a config folder |
| 19 | stat: |
| 20 | path: "/etc/openstack" |
| 21 | register: openstack_configs |
| 22 | |
| 23 | - name: Copy configuration files |
| 24 | command: cp -pRL /etc/openstack {{ stage_dir }}/etc/ |
| 25 | when: openstack_configs.stat.exists |