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

Note

This plugin is part of the containers.podman collection (version 1.4.1).

To install it use: ansible-galaxy collection install containers.podman.

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

New in version 1.0.0: of containers.podman

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 Choices/Defaults 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
Default:
"podman"
Path to podman executable if it is not in the $PATH on the machine running 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 Returned Description
login
dictionary
always
Logged in user for a registry

Sample:
{'logged_in': True, 'registry': 'docker.io', 'username': 'clelange'}


Authors

  • Clemens Lange (@clelange)