containers.podman.podman_login_info module – Return the logged-in user if any for a given registry

Note

This module is part of the containers.podman collection (version 1.10.1).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install containers.podman. You need further requirements to be able to use this module, see Requirements for details.

To use it in a playbook, specify: containers.podman.podman_login_info.

New in containers.podman 1.0.0

Synopsis

  • Return the logged-in user if any for a given registry.

Requirements

The below requirements are needed on the host that executes this module.

  • Podman installed on host

Parameters

Parameter

Comments

authfile

path

Path of the authentication file. Default is ``${XDG_RUNTIME_DIR}/containers/auth.json`` (Not available for remote commands) You can also override the default path of the authentication file by setting the ``REGISTRY_AUTH_FILE`` environment variable. ``export REGISTRY_AUTH_FILE=path``

executable

string

Path to podman executable if it is not in the $PATH on the machine running podman

Default: "podman"

registry

string / required

Registry server.

Examples

- name: Return the logged-in user for docker hub registry
  containers.podman.podman_login_info:
    registry: docker.io

- name: Return the logged-in user for quay.io registry
  containers.podman.podman_login_info:
    registry: quay.io

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

login

dictionary

Logged in user for a registry

Returned: always

Sample: {"logged_in": true, "registry": "docker.io", "username": "clelange"}

Authors

  • Clemens Lange (@clelange)