|
12 | 12 |
|
13 | 13 | - name: deploy podified Glance with local backend |
14 | 14 | when: glance_backend == 'nfs' |
15 | | - block: |
16 | | - - name: Fail if no nfs_server_addr/nfs_server_path are definied |
17 | | - when: |
18 | | - - nfs_server_addr is not defined |
19 | | - - nfs_server_path is not defined |
20 | | - ansible.builtin.fail: |
21 | | - msg: |
22 | | - - 'nfs_server_addr/nfs_server_path must be defined' |
23 | | - - name: Generate the glance CR config spec based on the selected backend |
24 | | - ansible.builtin.template: |
25 | | - src: glance_nfs.yaml.j2 |
26 | | - dest: /tmp/glance_nfs.yaml |
27 | | - mode: "0600" |
28 | | - - name: Deploy GlanceAPI with NFS backend |
29 | | - ansible.builtin.shell: | |
30 | | - {{ shell_header }} |
31 | | - {{ oc_header }} |
32 | | - oc patch openstackcontrolplane openstack --type=merge --patch-file=/tmp/glance_nfs.yaml |
| 15 | + ansible.builtin.include_tasks: glance_nfs.yaml |
33 | 16 |
|
34 | 17 | - name: template out the glance backend |
35 | 18 | ansible.builtin.template: |
36 | 19 | src: "{{ role_path }}/templates/glance_ceph.yaml.j2" |
37 | 20 | dest: "{{ role_path }}/files/glance_ceph.yaml" |
38 | 21 | mode: '644' |
| 22 | + when: glance_backend == 'ceph' |
39 | 23 |
|
40 | 24 | - name: deploy podified Glance with Ceph backend |
41 | 25 | ansible.builtin.shell: | |
|
49 | 33 | src: "{{ role_path }}/templates/glance_swift.yaml.j2" |
50 | 34 | dest: "{{ role_path }}/files/glance_swift.yaml" |
51 | 35 | mode: '644' |
| 36 | + when: glance_backend == 'swift' |
52 | 37 |
|
53 | 38 | - name: deploy podified Glance with Swift backend |
54 | 39 | ansible.builtin.shell: | |
|
62 | 47 | src: "{{ role_path }}/templates/glance_cinder.yaml.j2" |
63 | 48 | dest: "{{ role_path }}/files/glance_cinder.yaml" |
64 | 49 | mode: '644' |
| 50 | + when: glance_backend == 'cinder' |
65 | 51 |
|
66 | 52 | - name: deploy podified Glance with Cinder backend |
67 | 53 | ansible.builtin.shell: | |
|
0 commit comments