mirror of
https://github.com/containers/ansible-podman-collections.git
synced 2026-02-03 23:01:48 +00:00
307 lines
No EOL
20 KiB
HTML
307 lines
No EOL
20 KiB
HTML
|
||
|
||
<!DOCTYPE html>
|
||
<html class="writer-html5" lang="en" data-content_root="../../../">
|
||
<head>
|
||
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||
<meta content="2.21.0" name="antsibull-docs" />
|
||
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||
<title>containers.podman.podman_login module – Login to a container registry using podman — Ansible collections documentation</title>
|
||
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=41de9001" />
|
||
<link rel="stylesheet" type="text/css" href="../../../_static/css/ansible.css?v=c5b67dd2" />
|
||
<link rel="stylesheet" type="text/css" href="../../../_static/antsibull-minimal.css" />
|
||
<link rel="stylesheet" type="text/css" href="../../../_static/css/rtd-ethical-ads.css?v=289b023e" />
|
||
|
||
|
||
<link rel="shortcut icon" href="../../../_static/images/Ansible-Mark-RGB_Black.png"/>
|
||
<script src="../../../_static/jquery.js?v=5d32c60e"></script>
|
||
<script src="../../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
|
||
<script src="../../../_static/documentation_options.js?v=7f41d439"></script>
|
||
<script src="../../../_static/doctools.js?v=9bcbadda"></script>
|
||
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
|
||
<script src="../../../_static/js/theme.js"></script>
|
||
<link rel="search" title="Search" href="../../../search.html" />
|
||
<link rel="next" title="containers.podman.podman_login_info module – Return the logged-in user if any for a given registry" href="podman_login_info_module.html" />
|
||
<link rel="prev" title="containers.podman.podman_load module – Load image from a tar file." href="podman_load_module.html" /><!-- extra head elements for Ansible beyond RTD Sphinx Theme -->
|
||
|
||
|
||
|
||
|
||
</head>
|
||
|
||
<body class="wy-body-for-nav"><!-- extra body elements for Ansible beyond RTD Sphinx Theme -->
|
||
|
||
<div class="DocSite-globalNav ansibleNav">
|
||
<ul>
|
||
<li><a href="https://www.ansible.com/blog" target="_blank">Blog</a></li>
|
||
<li><a href="https://forum.ansible.com/" target="_blank">Ansible community forum</a></li>
|
||
<li><a href="https://docs.ansible.com/" target="_blank">Documentation</a></li>
|
||
</ul>
|
||
</div>
|
||
|
||
<a class="DocSite-nav" href="/" style="padding-bottom: 30px;">
|
||
|
||
<img class="DocSiteNav-logo"
|
||
src="../../../_static/images/Ansible-Mark-RGB_White.png"
|
||
alt="Ansible Logo">
|
||
<div class="DocSiteNav-title">Ansible Collections Documentation</div>
|
||
</a>
|
||
<div class="wy-grid-for-nav">
|
||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||
<div class="wy-side-scroll">
|
||
<div class="wy-side-nav-search" >
|
||
|
||
|
||
|
||
<a href="../../../index.html" class="icon icon-home">
|
||
Ansible collections
|
||
</a><!--- Based on https://github.com/rtfd/sphinx_rtd_theme/pull/438/files -->
|
||
|
||
<div class="version">
|
||
|
||
|
||
|
||
</div>
|
||
<div role="search">
|
||
<form id="rtd-search-form" class="wy-form" action="../../../search.html" method="get">
|
||
<label class="sr-only" for="q">Search docs:</label>
|
||
<input type="text" class="st-default-search-input" id="q" name="q" placeholder="Search docs" />
|
||
<input type="hidden" name="check_keywords" value="yes" />
|
||
<input type="hidden" name="area" value="default" />
|
||
</form>
|
||
</div>
|
||
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
|
||
|
||
<p class="caption" role="heading"><span class="caption-text">Collections:</span></p>
|
||
<ul class="current">
|
||
<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Collection Index</a><ul class="current">
|
||
<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Collections in the Containers Namespace</a><ul class="current">
|
||
<li class="toctree-l3 current"><a class="reference internal" href="index.html">Containers.Podman</a><ul class="current">
|
||
<li class="toctree-l4"><a class="reference internal" href="index.html#description">Description</a></li>
|
||
<li class="toctree-l4 current"><a class="reference internal" href="index.html#plugin-index">Plugin Index</a></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
<p class="caption" role="heading"><span class="caption-text">Plugin indexes:</span></p>
|
||
<ul>
|
||
<li class="toctree-l1"><a class="reference internal" href="../../index_become.html">Index of all Become Plugins</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../../index_connection.html">Index of all Connection Plugins</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../../index_inventory.html">Index of all Inventory Plugins</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../../index_module.html">Index of all Modules</a></li>
|
||
</ul>
|
||
<p class="caption" role="heading"><span class="caption-text">Reference indexes:</span></p>
|
||
<ul>
|
||
<li class="toctree-l1"><a class="reference internal" href="../../environment_variables.html">Index of all Collection Environment Variables</a></li>
|
||
</ul>
|
||
<!-- extra nav elements for Ansible beyond RTD Sphinx Theme -->
|
||
|
||
</div>
|
||
</div>
|
||
</nav>
|
||
|
||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
|
||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||
<a href="../../../index.html">Ansible collections</a>
|
||
</nav>
|
||
|
||
<div class="wy-nav-content">
|
||
<div class="rst-content">
|
||
<div role="navigation" aria-label="Page navigation">
|
||
<ul class="wy-breadcrumbs">
|
||
<li><a href="../../../index.html" class="icon icon-home" aria-label="Home"></a></li>
|
||
<li class="breadcrumb-item"><a href="../../index.html">Collection Index</a></li>
|
||
<li class="breadcrumb-item"><a href="../index.html">Collections in the Containers Namespace</a></li>
|
||
<li class="breadcrumb-item"><a href="index.html">Containers.Podman</a></li>
|
||
<li class="breadcrumb-item active">containers.podman.podman_login module – Login to a container registry using podman</li>
|
||
<li class="wy-breadcrumbs-aside">
|
||
</li>
|
||
</ul>
|
||
<hr/>
|
||
</div>
|
||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||
|
||
|
||
<div itemprop="articleBody">
|
||
|
||
<span class="target" id="ansible-collections-containers-podman-podman-login-module"></span><section id="containers-podman-podman-login-module-login-to-a-container-registry-using-podman">
|
||
<h1>containers.podman.podman_login module – Login to a container registry using podman<a class="headerlink" href="#containers-podman-podman-login-module-login-to-a-container-registry-using-podman" title="Link to this heading"></a></h1>
|
||
<div class="admonition note">
|
||
<p class="admonition-title">Note</p>
|
||
<p>This module is part of the <a class="reference external" href="https://galaxy.ansible.com/ui/repo/published/containers/podman/">containers.podman collection</a> (version 1.18.0).</p>
|
||
<p>It is not included in <code class="docutils literal notranslate"><span class="pre">ansible-core</span></code>.
|
||
To check whether it is installed, run <code class="code docutils literal notranslate"><span class="pre">ansible-galaxy</span> <span class="pre">collection</span> <span class="pre">list</span></code>.</p>
|
||
<p>To install it, use: <code class="code docutils literal notranslate"><span class="pre">ansible-galaxy</span> <span class="pre">collection</span> <span class="pre">install</span> <span class="pre">containers.podman</span></code>.
|
||
You need further requirements to be able to use this module,
|
||
see <a class="reference internal" href="#ansible-collections-containers-podman-podman-login-module-requirements"><span class="std std-ref">Requirements</span></a> for details.</p>
|
||
<p>To use it in a playbook, specify: <code class="code docutils literal notranslate"><span class="pre">containers.podman.podman_login</span></code>.</p>
|
||
</div>
|
||
<nav class="contents local" id="contents">
|
||
<ul class="simple">
|
||
<li><p><a class="reference internal" href="#synopsis" id="id1">Synopsis</a></p></li>
|
||
<li><p><a class="reference internal" href="#requirements" id="id2">Requirements</a></p></li>
|
||
<li><p><a class="reference internal" href="#parameters" id="id3">Parameters</a></p></li>
|
||
<li><p><a class="reference internal" href="#examples" id="id4">Examples</a></p></li>
|
||
</ul>
|
||
</nav>
|
||
<section id="synopsis">
|
||
<h2><a class="toc-backref" href="#id1" role="doc-backlink">Synopsis</a><a class="headerlink" href="#synopsis" title="Link to this heading"></a></h2>
|
||
<ul class="simple">
|
||
<li><p>Login to a container registry server using the podman login command If the registry is not specified, the first registry under `[registries.search]` from `registries.conf `will be used. The path of the authentication file can be overridden by the user by setting the `authfile` flag. The default path used is `${XDG_RUNTIME_DIR}/containers/auth.json`.</p></li>
|
||
</ul>
|
||
</section>
|
||
<section id="requirements">
|
||
<span id="ansible-collections-containers-podman-podman-login-module-requirements"></span><h2><a class="toc-backref" href="#id2" role="doc-backlink">Requirements</a><a class="headerlink" href="#requirements" title="Link to this heading"></a></h2>
|
||
<p>The below requirements are needed on the host that executes this module.</p>
|
||
<ul class="simple">
|
||
<li><p>Podman installed on host</p></li>
|
||
</ul>
|
||
</section>
|
||
<section id="parameters">
|
||
<h2><a class="toc-backref" href="#id3" role="doc-backlink">Parameters</a><a class="headerlink" href="#parameters" title="Link to this heading"></a></h2>
|
||
<table class="longtable ansible-option-table docutils align-default" style="width: 100%">
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>Parameter</p></th>
|
||
<th class="head"><p>Comments</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||
<div class="ansibleOptionAnchor" id="parameter-authfile"></div><p class="ansible-option-title" id="ansible-collections-containers-podman-podman-login-module-parameter-authfile"><strong>authfile</strong></p>
|
||
<a class="ansibleOptionLink" href="#parameter-authfile" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||
</div></td>
|
||
<td><div class="ansible-option-cell"><p>Path of the authentication file. Default is ``${XDG_RUNTIME_DIR}/containers/auth.json`` You can also override the default path of the authentication file by setting the ``REGISTRY_AUTH_FILE`` environment variable. ``export REGISTRY_AUTH_FILE=path``</p>
|
||
</div></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||
<div class="ansibleOptionAnchor" id="parameter-certdir"></div><p class="ansible-option-title" id="ansible-collections-containers-podman-podman-login-module-parameter-certdir"><strong>certdir</strong></p>
|
||
<a class="ansibleOptionLink" href="#parameter-certdir" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||
</div></td>
|
||
<td><div class="ansible-option-cell"><p>Use certificates at path (*.crt, *.cert, *.key) to connect to the registry. Default certificates directory is /etc/containers/certs.d.</p>
|
||
</div></td>
|
||
</tr>
|
||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||
<div class="ansibleOptionAnchor" id="parameter-executable"></div><p class="ansible-option-title" id="ansible-collections-containers-podman-podman-login-module-parameter-executable"><strong>executable</strong></p>
|
||
<a class="ansibleOptionLink" href="#parameter-executable" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||
</div></td>
|
||
<td><div class="ansible-option-cell"><p>Path to <code class="docutils literal notranslate"><span class="pre">podman</span></code> executable if it is not in the <code class="docutils literal notranslate"><span class="pre">$PATH</span></code> on the machine running <code class="docutils literal notranslate"><span class="pre">podman</span></code></p>
|
||
<p class="ansible-option-line"><strong class="ansible-option-default-bold">Default:</strong> <code class="ansible-option-default docutils literal notranslate"><span class="pre">"podman"</span></code></p>
|
||
</div></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||
<div class="ansibleOptionAnchor" id="parameter-password"></div><p class="ansible-option-title" id="ansible-collections-containers-podman-podman-login-module-parameter-password"><strong>password</strong></p>
|
||
<a class="ansibleOptionLink" href="#parameter-password" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||
</div></td>
|
||
<td><div class="ansible-option-cell"><p>Password for the registry server.</p>
|
||
</div></td>
|
||
</tr>
|
||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||
<div class="ansibleOptionAnchor" id="parameter-registry"></div><p class="ansible-option-title" id="ansible-collections-containers-podman-podman-login-module-parameter-registry"><strong>registry</strong></p>
|
||
<a class="ansibleOptionLink" href="#parameter-registry" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||
</div></td>
|
||
<td><div class="ansible-option-cell"><p>Registry server. If the registry is not specified, the first registry under `[registries.search]` from `registries.conf` will be used.</p>
|
||
</div></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||
<div class="ansibleOptionAnchor" id="parameter-secret"></div><p class="ansible-option-title" id="ansible-collections-containers-podman-podman-login-module-parameter-secret"><strong>secret</strong></p>
|
||
<a class="ansibleOptionLink" href="#parameter-secret" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||
</div></td>
|
||
<td><div class="ansible-option-cell"><p>Name of an existing <code class="docutils literal notranslate"><span class="pre">podman</span></code> secret to use for authentication to target registry</p>
|
||
</div></td>
|
||
</tr>
|
||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||
<div class="ansibleOptionAnchor" id="parameter-tlsverify"></div><p class="ansible-option-title" id="ansible-collections-containers-podman-podman-login-module-parameter-tlsverify"><strong>tlsverify</strong></p>
|
||
<a class="ansibleOptionLink" href="#parameter-tlsverify" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||
</div></td>
|
||
<td><div class="ansible-option-cell"><p>Require HTTPS and verify certificates when contacting registries. If explicitly set to true, then TLS verification will be used. If set to false, then TLS verification will not be used. If not specified, TLS verification will be used unless the target registry is listed as an insecure registry in registries.conf.</p>
|
||
<p class="ansible-option-line"><strong class="ansible-option-choices">Choices:</strong></p>
|
||
<ul class="simple">
|
||
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">false</span></code></p></li>
|
||
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">true</span></code></p></li>
|
||
</ul>
|
||
</div></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||
<div class="ansibleOptionAnchor" id="parameter-username"></div><p class="ansible-option-title" id="ansible-collections-containers-podman-podman-login-module-parameter-username"><strong>username</strong></p>
|
||
<a class="ansibleOptionLink" href="#parameter-username" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||
</div></td>
|
||
<td><div class="ansible-option-cell"><p>Username for the registry server.</p>
|
||
</div></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</section>
|
||
<section id="examples">
|
||
<h2><a class="toc-backref" href="#id4" role="doc-backlink">Examples</a><a class="headerlink" href="#examples" title="Link to this heading"></a></h2>
|
||
<div class="highlight-yaml+jinja notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">Login to default registry and create ${XDG_RUNTIME_DIR}/containers/auth.json</span>
|
||
<span class="w"> </span><span class="nt">containers.podman.podman_login</span><span class="p">:</span>
|
||
<span class="w"> </span><span class="nt">username</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">user</span>
|
||
<span class="w"> </span><span class="nt">password</span><span class="p">:</span><span class="w"> </span><span class="s">'p4ssw0rd'</span>
|
||
|
||
<span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">Login to quay.io and create ${XDG_RUNTIME_DIR}/containers/auth.json</span>
|
||
<span class="w"> </span><span class="nt">containers.podman.podman_login</span><span class="p">:</span>
|
||
<span class="w"> </span><span class="nt">username</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">user</span>
|
||
<span class="w"> </span><span class="nt">password</span><span class="p">:</span><span class="w"> </span><span class="s">'p4ssw0rd'</span>
|
||
<span class="w"> </span><span class="nt">registry</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">quay.io</span>
|
||
|
||
<span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">Login to quay.io using existing secret called password</span>
|
||
<span class="w"> </span><span class="nt">containers.podman.podman_login</span><span class="p">:</span>
|
||
<span class="w"> </span><span class="nt">username</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">user</span>
|
||
<span class="w"> </span><span class="nt">secret</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">password</span>
|
||
<span class="w"> </span><span class="nt">registry</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">quay.io</span>
|
||
</pre></div>
|
||
</div>
|
||
<section id="authors">
|
||
<h3>Authors<a class="headerlink" href="#authors" title="Link to this heading"></a></h3>
|
||
<ul class="simple">
|
||
<li><p>Jason Hiatt (@jthiatt)</p></li>
|
||
<li><p>Clemens Lange (@clelange)</p></li>
|
||
<li><p>Michael Fox (@spmfox)</p></li>
|
||
</ul>
|
||
</section>
|
||
<section id="collection-links">
|
||
<h3>Collection links<a class="headerlink" href="#collection-links" title="Link to this heading"></a></h3>
|
||
<ul class="ansible-links">
|
||
<li><span><a aria-role="button" class="ansible-link reference external" href="https://github.com/containers/ansible-podman-collections/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc" rel="noopener external" target="_blank">Issue Tracker</a></span></li>
|
||
<li><span><a aria-role="button" class="ansible-link reference external" href="https://github.com/containers/ansible-podman-collections" rel="noopener external" target="_blank">Repository (Sources)</a></span></li>
|
||
</ul>
|
||
</section>
|
||
</section>
|
||
</section>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
|
||
|
||
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
|
||
<a href="podman_load_module.html" class="btn btn-neutral float-left" title="containers.podman.podman_load module – Load image from a tar file." accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
|
||
<a href="podman_login_info_module.html" class="btn btn-neutral float-right" title="containers.podman.podman_login_info module – Return the logged-in user if any for a given registry" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
|
||
</div>
|
||
|
||
<hr/>
|
||
|
||
<div role="contentinfo">
|
||
<p>© Copyright Ansible contributors.</p>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
</footer>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
</div>
|
||
<script>
|
||
jQuery(function () {
|
||
SphinxRtdTheme.Navigation.enable(true);
|
||
});
|
||
</script><!-- extra footer elements for Ansible beyond RTD Sphinx Theme -->
|
||
|
||
</body>
|
||
</html> |