|
| 1 | +- name: Check if registry auth file exists |
| 2 | + ansible.builtin.stat: |
| 3 | + path: "{{ pulp_registry_auth_file }}" |
| 4 | + register: pulp_registry_auth_file_stat |
| 5 | + |
| 6 | +- name: Set registry auth file permissions |
| 7 | + ansible.builtin.file: |
| 8 | + path: "{{ pulp_registry_auth_file }}" |
| 9 | + mode: '0600' |
| 10 | + when: pulp_registry_auth_file_stat.stat.exists |
| 11 | + |
1 | 12 | - name: Pull the Pulp API container image |
2 | 13 | containers.podman.podman_image: |
3 | 14 | name: "{{ pulp_api_image }}" |
4 | 15 | state: present |
| 16 | + environment: |
| 17 | + REGISTRY_AUTH_FILE: "{{ pulp_registry_auth_file if pulp_registry_auth_file_stat.stat.exists else omit }}" |
5 | 18 |
|
6 | 19 | - name: Pull the Pulp Content container image |
7 | 20 | containers.podman.podman_image: |
8 | 21 | name: "{{ pulp_content_image }}" |
9 | 22 | state: present |
| 23 | + environment: |
| 24 | + REGISTRY_AUTH_FILE: "{{ pulp_registry_auth_file if pulp_registry_auth_file_stat.stat.exists else omit }}" |
10 | 25 |
|
11 | 26 | - name: Pull the Pulp Worker container image |
12 | 27 | containers.podman.podman_image: |
13 | 28 | name: "{{ pulp_worker_image }}" |
14 | 29 | state: present |
| 30 | + environment: |
| 31 | + REGISTRY_AUTH_FILE: "{{ pulp_registry_auth_file if pulp_registry_auth_file_stat.stat.exists else omit }}" |
15 | 32 |
|
16 | 33 | - name: Create Pulp storage |
17 | 34 | ansible.builtin.file: |
|
199 | 216 | detach: false |
200 | 217 | network: host |
201 | 218 | volumes: "{{ pulp_volumes }}" |
| 219 | + environment: |
| 220 | + REGISTRY_AUTH_FILE: "{{ pulp_registry_auth_file if pulp_registry_auth_file_stat.stat.exists else omit }}" |
202 | 221 | secrets: |
203 | 222 | - 'pulp-symmetric-key,type=mount,target=/etc/pulp/certs/database_fields.symmetric.key' |
204 | 223 | - 'pulp-db-password,type=env,target=PULP_DATABASES__default__PASSWORD' |
|
212 | 231 | detach: false |
213 | 232 | network: host |
214 | 233 | volumes: "{{ pulp_volumes }}" |
| 234 | + environment: |
| 235 | + REGISTRY_AUTH_FILE: "{{ pulp_registry_auth_file if pulp_registry_auth_file_stat.stat.exists else omit }}" |
215 | 236 | secrets: |
216 | 237 | - 'pulp-symmetric-key,type=mount,target=/etc/pulp/certs/database_fields.symmetric.key' |
217 | 238 | - 'pulp-db-password,type=env,target=PULP_DATABASES__default__PASSWORD' |
|
0 commit comments