podman: Login to registries

This commit is contained in:
uumas
2025-09-16 12:36:58 +03:00
parent 597faa3fd5
commit c5fb7f599c
3 changed files with 30 additions and 1 deletions

View File

@@ -0,0 +1,2 @@
---
podman_registry_accounts: []

View File

@@ -2,4 +2,23 @@
argument_specs:
main:
description: Installs podman
options: {}
options:
podman_registry_accounts:
description: Dict of accounts for container repositories
type: list
required: false
default: []
elements: dict
options:
registry:
description: Registry server to login to
type: str
required: true
username:
description: Username
type: str
required: true
password:
description: Password / token
type: str
required: true

View File

@@ -10,3 +10,11 @@
name: podman-auto-update.timer
state: started
enabled: true
- name: Login to registries
containers.podman.podman_login:
registry: "{{ item.registry }}"
username: "{{ item.username }}"
password: "{{ item.password }}"
authfile: /run/containers/0/auth.json
loop: "{{ podman_registry_accounts }}"