Use auth file instead of creds in quadlet files
This commit is contained in:
@@ -6,9 +6,14 @@
|
||||
- name: Create container image service {{ image_name }}
|
||||
containers.podman.podman_image:
|
||||
name: "{{ image_name }}"
|
||||
username: "{{ image_creds.username if image_creds.username | length > 0 else omit }}"
|
||||
password: "{{ image_creds.password if image_creds.password | length > 0 else omit }}"
|
||||
state: quadlet
|
||||
quadlet_filename: "{{ image_name | replace('/', '_') }}"
|
||||
quadlet_file_mode: "0600"
|
||||
quadlet_options: >-
|
||||
{{
|
||||
['AuthFile=/etc/containers/auth.json']
|
||||
if image_name.split('/')[0] in
|
||||
podman_registry_accounts | map(attribute='registry')
|
||||
else []
|
||||
}}
|
||||
notify: Reload systemd daemon
|
||||
|
||||
Reference in New Issue
Block a user