|
149 | 149 | - seed-host-configure/pre.d/ |
150 | 150 | - infra-vm-host-configure/pre.d/ |
151 | 151 |
|
| 152 | + - name: Check if custom playbooks are stored in separate directories |
| 153 | + ansible.builtin.stat: |
| 154 | + path: "{{ src_directory }}/{{ kayobe_config_name }}/etc/kayobe/ansible/fixes" |
| 155 | + register: kayobe_playbooks_dir |
| 156 | + |
| 157 | + - name: Set custom playbook prefixes |
| 158 | + ansible.builtin.set_fact: |
| 159 | + fixes_prefix: "{{ fixes/ if kayobe_playbooks_dir.stat.exists else '' }}" |
| 160 | + tools_prefix: "{{ tools/ if kayobe_playbooks_dir.stat.exists else '' }}" |
| 161 | + |
152 | 162 | - name: Ensure Kayobe hooks are present |
153 | 163 | ansible.builtin.file: |
154 | 164 | src: '{{ src_directory }}/{{ kayobe_config_name }}/etc/kayobe/ansible/{{ item.src }}' |
155 | 165 | dest: '{{ src_directory }}/{{ kayobe_config_name }}/etc/kayobe/hooks/{{ item.dest }}' |
156 | 166 | state: link |
157 | 167 | loop: |
158 | | - - { src: growroot.yml, dest: overcloud-host-configure/pre.d/5-growroot.yml } |
159 | | - - { src: fix-hostname.yml, dest: overcloud-host-configure/pre.d/10-fix-hostname.yml } |
160 | | - - { src: fix-networking.yml, dest: overcloud-host-configure/pre.d/15-fix-networking.yml } |
161 | | - - { src: configure-vxlan.yml, dest: overcloud-host-configure/pre.d/20-configure-vxlan.yml } |
162 | | - - { src: growroot.yml, dest: seed-host-configure/pre.d/5-growroot.yml } |
163 | | - - { src: fix-networking.yml, dest: seed-host-configure/pre.d/15-fix-networking.yml } |
164 | | - - { src: configure-vxlan.yml, dest: seed-host-configure/pre.d/20-configure-vxlan.yml } |
165 | | - - { src: growroot.yml, dest: infra-vm-host-configure/pre.d/5-growroot.yml } |
166 | | - - { src: fix-networking.yml, dest: infra-vm-host-configure/pre.d/15-fix-networking.yml } |
167 | | - - { src: configure-vxlan.yml, dest: infra-vm-host-configure/pre.d/20-configure-vxlan.yml } |
| 168 | + - { src: "{{ tools_prefix }}growroot.yml", dest: overcloud-host-configure/pre.d/5-growroot.yml } |
| 169 | + - { src: "{{ fixes_prefix }}fix-hostname.yml", dest: overcloud-host-configure/pre.d/10-fix-hostname.yml } |
| 170 | + - { src: "{{ fixes_prefix }}fix-networking.yml", dest: overcloud-host-configure/pre.d/15-fix-networking.yml } |
| 171 | + - { src: "{{ tools_prefix }}configure-vxlan.yml", dest: overcloud-host-configure/pre.d/20-configure-vxlan.yml } |
| 172 | + - { src: "{{ tools_prefix }}growroot.yml", dest: seed-host-configure/pre.d/5-growroot.yml } |
| 173 | + - { src: "{{ fixes_prefix }}fix-networking.yml", dest: seed-host-configure/pre.d/15-fix-networking.yml } |
| 174 | + - { src: "{{ tools_prefix }}configure-vxlan.yml", dest: seed-host-configure/pre.d/20-configure-vxlan.yml } |
| 175 | + - { src: "{{ tools_prefix }}growroot.yml", dest: infra-vm-host-configure/pre.d/5-growroot.yml } |
| 176 | + - { src: "{{ fixes_prefix }}fix-networking.yml", dest: infra-vm-host-configure/pre.d/15-fix-networking.yml } |
| 177 | + - { src: "{{ tools_prefix }}configure-vxlan.yml", dest: infra-vm-host-configure/pre.d/20-configure-vxlan.yml } |
168 | 178 |
|
169 | 179 | - name: Ensure Admin Overcloud Network file is present |
170 | 180 | ansible.builtin.copy: |
|
0 commit comments