|
52 | 52 | terrarium_docker_registry_config_path: /root/.docker/config.json |
53 | 53 | terrarium_docker_hardened_images: auto |
54 | 54 | terrarium_docker_hardened_image_mirrors: true |
55 | | - terrarium_docker_hardened_image_arch_supported: "{{ ansible_architecture in ['x86_64', 'amd64'] }}" |
56 | 55 | terrarium_oauth2_proxy_image: "" |
57 | 56 | terrarium_oauth2_proxy_image_hardened: "dhi.io/oauth2-proxy:7.15.2-debian13@sha256:8f4e89762735e7ec7c3f1bbdd5da4dcd55358db8c3278bfbc2e46a7f86ab7d9e" |
58 | 57 | terrarium_oauth2_proxy_image_mirror: "ghcr.io/terion-name/terrarium-dhi-oauth2-proxy:7.15.2-debian13@sha256:8f4e89762735e7ec7c3f1bbdd5da4dcd55358db8c3278bfbc2e46a7f86ab7d9e" |
|
148 | 147 | path: "{{ terrarium_docker_registry_config_path }}" |
149 | 148 | register: terrarium_docker_registry_config |
150 | 149 | no_log: true |
151 | | - - name: Assert hardened images support this host architecture |
152 | | - ansible.builtin.assert: |
153 | | - that: |
154 | | - - terrarium_docker_hardened_image_arch_supported | bool |
155 | | - fail_msg: "Pinned Docker Hardened Images currently support Terrarium's selected oauth2-proxy and Postgres variants on linux/amd64 only. Use terrarium_docker_hardened_images: auto or false, or set explicit image overrides, on this host architecture." |
156 | | - when: |
157 | | - - (terrarium_docker_hardened_images | string | lower) in ['true', 'yes', '1'] |
158 | 150 | - name: Resolve hardened image preference |
159 | 151 | ansible.builtin.set_fact: |
160 | 152 | terrarium_docker_hardened_images_effective: >- |
161 | 153 | {{ |
162 | | - (terrarium_docker_hardened_image_arch_supported | bool) |
163 | | - and ( |
164 | | - (terrarium_docker_hardened_images | string | lower) in ['true', 'yes', '1'] |
165 | | - or ( |
166 | | - (terrarium_docker_hardened_images | string | lower) == 'auto' |
167 | | - and terrarium_docker_registry_config.stat.exists |
168 | | - ) |
| 154 | + (terrarium_docker_hardened_images | string | lower) in ['true', 'yes', '1'] |
| 155 | + or ( |
| 156 | + (terrarium_docker_hardened_images | string | lower) == 'auto' |
| 157 | + and terrarium_docker_registry_config.stat.exists |
169 | 158 | ) |
170 | 159 | }} |
171 | 160 | no_log: true |
172 | 161 | - name: Resolve hardened image mirror preference |
173 | 162 | ansible.builtin.set_fact: |
174 | 163 | terrarium_docker_hardened_image_mirrors_effective: >- |
175 | 164 | {{ |
176 | | - (terrarium_docker_hardened_image_arch_supported | bool) |
177 | | - and (terrarium_docker_hardened_images | string | lower) not in ['false', 'no', '0'] |
| 165 | + (terrarium_docker_hardened_images | string | lower) not in ['false', 'no', '0'] |
178 | 166 | and (terrarium_docker_hardened_image_mirrors | string | lower) in ['true', 'yes', '1', 'auto'] |
179 | 167 | }} |
180 | 168 | no_log: true |
|
0 commit comments