| 1 |
|
| 2 |
|
| 3 |
<!DOCTYPE html> |
| 4 |
<html class="writer-html5" lang="en" data-content_root="../../../"> |
| 5 |
<head> |
| 6 |
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" /> |
| 7 |
<meta content="2.24.0" name="antsibull-docs" /> |
| 8 |
|
| 9 |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
| 10 |
<title>containers.podman.podman_save module – Saves podman image to tar file — Ansible collections documentation</title> |
| 11 |
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=41de9001" /> |
| 12 |
<link rel="stylesheet" type="text/css" href="../../../_static/css/ansible.css?v=b54c304f" /> |
| 13 |
<link rel="stylesheet" type="text/css" href="../../../_static/antsibull-minimal.css" /> |
| 14 |
<link rel="stylesheet" type="text/css" href="../../../_static/css/rtd-ethical-ads.css?v=289b023e" /> |
| 15 |
|
| 16 |
|
| 17 |
<link rel="shortcut icon" href="../../../_static/images/Ansible-Mark-RGB_Black.png"/> |
| 18 |
<script src="../../../_static/jquery.js?v=5d32c60e"></script> |
| 19 |
<script src="../../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script> |
| 20 |
<script src="../../../_static/documentation_options.js?v=7f41d439"></script> |
| 21 |
<script src="../../../_static/doctools.js?v=fd6eb6e6"></script> |
| 22 |
<script src="../../../_static/sphinx_highlight.js?v=6ffebe34"></script> |
| 23 |
<script src="../../../_static/js/theme.js"></script> |
| 24 |
<link rel="search" title="Search" href="../../../search.html" /> |
| 25 |
<link rel="next" title="containers.podman.podman_search module – Search for remote images using podman" href="podman_search_module.html" /> |
| 26 |
<link rel="prev" title="containers.podman.podman_runlabel module – Run given label from given image" href="podman_runlabel_module.html" /><!-- extra head elements for Ansible beyond RTD Sphinx Theme --> |
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
</head> |
| 32 |
|
| 33 |
<body class="wy-body-for-nav"><!-- extra body elements for Ansible beyond RTD Sphinx Theme --> |
| 34 |
|
| 35 |
<div class="DocSite-globalNav ansibleNav"> |
| 36 |
<ul> |
| 37 |
<li><a href="https://www.ansible.com/blog" target="_blank">Blog</a></li> |
| 38 |
<li><a href="https://forum.ansible.com/" target="_blank">Ansible community forum</a></li> |
| 39 |
<li><a href="https://docs.ansible.com/" target="_blank">Documentation</a></li> |
| 40 |
</ul> |
| 41 |
</div> |
| 42 |
|
| 43 |
<a class="DocSite-nav" href="/" style="padding-bottom: 30px;"> |
| 44 |
|
| 45 |
<img class="DocSiteNav-logo" |
| 46 |
src="../../../_static/images/Ansible-Mark-RGB_White.png" |
| 47 |
alt="Ansible Logo"> |
| 48 |
<div class="DocSiteNav-title">Ansible Collections Documentation</div> |
| 49 |
</a> |
| 50 |
<div class="wy-grid-for-nav"> |
| 51 |
<nav data-toggle="wy-nav-shift" class="wy-nav-side"> |
| 52 |
<div class="wy-side-scroll"> |
| 53 |
<div class="wy-side-nav-search" > |
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
<a href="../../../index.html" class="icon icon-home"> |
| 58 |
Ansible collections |
| 59 |
</a><!--- Based on https://github.com/rtfd/sphinx_rtd_theme/pull/438/files --> |
| 60 |
|
| 61 |
<div class="version"> |
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
</div> |
| 66 |
<div role="search"> |
| 67 |
<form id="rtd-search-form" class="wy-form" action="../../../search.html" method="get"> |
| 68 |
<label class="sr-only" for="q">Search docs:</label> |
| 69 |
<input type="text" class="st-default-search-input" id="q" name="q" placeholder="Search docs" /> |
| 70 |
<input type="hidden" name="check_keywords" value="yes" /> |
| 71 |
<input type="hidden" name="area" value="default" /> |
| 72 |
</form> |
| 73 |
</div> |
| 74 |
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu"> |
| 75 |
|
| 76 |
<p class="caption" role="heading"><span class="caption-text">Collections:</span></p> |
| 77 |
<ul class="current"> |
| 78 |
<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Collection Index</a><ul class="current"> |
| 79 |
<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Collections in the Containers Namespace</a><ul class="current"> |
| 80 |
<li class="toctree-l3 current"><a class="reference internal" href="index.html">Containers.Podman</a><ul class="current"> |
| 81 |
<li class="toctree-l4"><a class="reference internal" href="index.html#description">Description</a></li> |
| 82 |
<li class="toctree-l4 current"><a class="reference internal" href="index.html#plugin-index">Plugin Index</a></li> |
| 83 |
</ul> |
| 84 |
</li> |
| 85 |
</ul> |
| 86 |
</li> |
| 87 |
</ul> |
| 88 |
</li> |
| 89 |
</ul> |
| 90 |
<p class="caption" role="heading"><span class="caption-text">Plugin indexes:</span></p> |
| 91 |
<ul> |
| 92 |
<li class="toctree-l1"><a class="reference internal" href="../../index_become.html">Index of all Become Plugins</a></li> |
| 93 |
<li class="toctree-l1"><a class="reference internal" href="../../index_connection.html">Index of all Connection Plugins</a></li> |
| 94 |
<li class="toctree-l1"><a class="reference internal" href="../../index_inventory.html">Index of all Inventory Plugins</a></li> |
| 95 |
<li class="toctree-l1"><a class="reference internal" href="../../index_module.html">Index of all Modules</a></li> |
| 96 |
</ul> |
| 97 |
<p class="caption" role="heading"><span class="caption-text">Reference indexes:</span></p> |
| 98 |
<ul> |
| 99 |
<li class="toctree-l1"><a class="reference internal" href="../../environment_variables.html">Index of all Collection Environment Variables</a></li> |
| 100 |
</ul> |
| 101 |
<!-- extra nav elements for Ansible beyond RTD Sphinx Theme --> |
| 102 |
|
| 103 |
</div> |
| 104 |
</div> |
| 105 |
</nav> |
| 106 |
|
| 107 |
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" > |
| 108 |
<i data-toggle="wy-nav-top" class="fa fa-bars"></i> |
| 109 |
<a href="../../../index.html">Ansible collections</a> |
| 110 |
</nav> |
| 111 |
|
| 112 |
<div class="wy-nav-content"> |
| 113 |
<div class="rst-content"> |
| 114 |
<div role="navigation" aria-label="Page navigation"> |
| 115 |
<ul class="wy-breadcrumbs"> |
| 116 |
<li><a href="../../../index.html" class="icon icon-home" aria-label="Home"></a></li> |
| 117 |
<li class="breadcrumb-item"><a href="../../index.html">Collection Index</a></li> |
| 118 |
<li class="breadcrumb-item"><a href="../index.html">Collections in the Containers Namespace</a></li> |
| 119 |
<li class="breadcrumb-item"><a href="index.html">Containers.Podman</a></li> |
| 120 |
<li class="breadcrumb-item active">containers.podman.podman_save module – Saves podman image to tar file</li> |
| 121 |
<li class="wy-breadcrumbs-aside"> |
| 122 |
</li> |
| 123 |
</ul> |
| 124 |
<hr/> |
| 125 |
</div> |
| 126 |
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> |
| 127 |
|
| 128 |
|
| 129 |
<div itemprop="articleBody"> |
| 130 |
|
| 131 |
<span class="target" id="ansible-collections-containers-podman-podman-save-module"></span><section id="containers-podman-podman-save-module-saves-podman-image-to-tar-file"> |
| 132 |
<h1>containers.podman.podman_save module – Saves podman image to tar file<a class="headerlink" href="#containers-podman-podman-save-module-saves-podman-image-to-tar-file" title="Link to this heading"></a></h1> |
| 133 |
<div class="admonition note"> |
| 134 |
<p class="admonition-title">Note</p> |
| 135 |
<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.20.0).</p> |
| 136 |
<p>It is not included in <code class="docutils literal notranslate"><span class="pre">ansible-core</span></code>. |
| 137 |
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> |
| 138 |
<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>. |
| 139 |
You need further requirements to be able to use this module, |
| 140 |
see <a class="reference internal" href="#ansible-collections-containers-podman-podman-save-module-requirements"><span class="std std-ref">Requirements</span></a> for details.</p> |
| 141 |
<p>To use it in a playbook, specify: <code class="code docutils literal notranslate"><span class="pre">containers.podman.podman_save</span></code>.</p> |
| 142 |
</div> |
| 143 |
<nav class="contents local" id="contents"> |
| 144 |
<ul class="simple"> |
| 145 |
<li><p><a class="reference internal" href="#synopsis" id="id1">Synopsis</a></p></li> |
| 146 |
<li><p><a class="reference internal" href="#requirements" id="id2">Requirements</a></p></li> |
| 147 |
<li><p><a class="reference internal" href="#parameters" id="id3">Parameters</a></p></li> |
| 148 |
<li><p><a class="reference internal" href="#examples" id="id4">Examples</a></p></li> |
| 149 |
</ul> |
| 150 |
</nav> |
| 151 |
<section id="synopsis"> |
| 152 |
<h2><a class="toc-backref" href="#id1" role="doc-backlink">Synopsis</a><a class="headerlink" href="#synopsis" title="Link to this heading"></a></h2> |
| 153 |
<ul class="simple"> |
| 154 |
<li><p>podman save saves an image to either docker-archive, oci-archive, oci-dir (directory with oci manifest type), or docker-dir (directory with v2s2 manifest type) on the local machine, default is docker-archive.</p></li> |
| 155 |
</ul> |
| 156 |
</section> |
| 157 |
<section id="requirements"> |
| 158 |
<span id="ansible-collections-containers-podman-podman-save-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> |
| 159 |
<p>The below requirements are needed on the host that executes this module.</p> |
| 160 |
<ul class="simple"> |
| 161 |
<li><p>Podman installed on host</p></li> |
| 162 |
</ul> |
| 163 |
</section> |
| 164 |
<section id="parameters"> |
| 165 |
<h2><a class="toc-backref" href="#id3" role="doc-backlink">Parameters</a><a class="headerlink" href="#parameters" title="Link to this heading"></a></h2> |
| 166 |
<table class="longtable ansible-option-table docutils align-default" style="width: 100%"> |
| 167 |
<thead> |
| 168 |
<tr class="row-odd"><th class="head"><p>Parameter</p></th> |
| 169 |
<th class="head"><p>Comments</p></th> |
| 170 |
</tr> |
| 171 |
</thead> |
| 172 |
<tbody> |
| 173 |
<tr class="row-even"><td><div class="ansible-option-cell"> |
| 174 |
<div class="ansibleOptionAnchor" id="parameter-compress"></div><p class="ansible-option-title" id="ansible-collections-containers-podman-podman-save-module-parameter-compress"><strong>compress</strong></p> |
| 175 |
<a class="ansibleOptionLink" href="#parameter-compress" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p> |
| 176 |
</div></td> |
| 177 |
<td><div class="ansible-option-cell"><p>Compress tarball image layers when pushing to a directory using the ‘dir’ transport. (default is same compression type, compressed or uncompressed, as source)</p> |
| 178 |
<p class="ansible-option-line"><strong class="ansible-option-choices">Choices:</strong></p> |
| 179 |
<ul class="simple"> |
| 180 |
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">false</span></code></p></li> |
| 181 |
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">true</span></code></p></li> |
| 182 |
</ul> |
| 183 |
</div></td> |
| 184 |
</tr> |
| 185 |
<tr class="row-odd"><td><div class="ansible-option-cell"> |
| 186 |
<div class="ansibleOptionAnchor" id="parameter-dest"></div> |
| 187 |
<div class="ansibleOptionAnchor" id="parameter-path"></div><p class="ansible-option-title" id="ansible-collections-containers-podman-podman-save-module-parameter-path"><span id="ansible-collections-containers-podman-podman-save-module-parameter-dest"></span><strong>dest</strong></p> |
| 188 |
<a class="ansibleOptionLink" href="#parameter-dest" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-aliases">aliases: path</span></p> |
| 189 |
<p class="ansible-option-type-line"><span class="ansible-option-type">string</span> / <span class="ansible-option-required">required</span></p> |
| 190 |
</div></td> |
| 191 |
<td><div class="ansible-option-cell"><p>Destination file to write image to.</p> |
| 192 |
</div></td> |
| 193 |
</tr> |
| 194 |
<tr class="row-even"><td><div class="ansible-option-cell"> |
| 195 |
<div class="ansibleOptionAnchor" id="parameter-executable"></div><p class="ansible-option-title" id="ansible-collections-containers-podman-podman-save-module-parameter-executable"><strong>executable</strong></p> |
| 196 |
<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> |
| 197 |
</div></td> |
| 198 |
<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> |
| 199 |
<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> |
| 200 |
</div></td> |
| 201 |
</tr> |
| 202 |
<tr class="row-odd"><td><div class="ansible-option-cell"> |
| 203 |
<div class="ansibleOptionAnchor" id="parameter-force"></div><p class="ansible-option-title" id="ansible-collections-containers-podman-podman-save-module-parameter-force"><strong>force</strong></p> |
| 204 |
<a class="ansibleOptionLink" href="#parameter-force" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p> |
| 205 |
</div></td> |
| 206 |
<td><div class="ansible-option-cell"><p>Force saving to file even if it exists.</p> |
| 207 |
<p class="ansible-option-line"><strong class="ansible-option-choices">Choices:</strong></p> |
| 208 |
<ul class="simple"> |
| 209 |
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">false</span></code></p></li> |
| 210 |
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><strong><span class="pre">true</span></strong></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li> |
| 211 |
</ul> |
| 212 |
</div></td> |
| 213 |
</tr> |
| 214 |
<tr class="row-even"><td><div class="ansible-option-cell"> |
| 215 |
<div class="ansibleOptionAnchor" id="parameter-format"></div><p class="ansible-option-title" id="ansible-collections-containers-podman-podman-save-module-parameter-format"><strong>format</strong></p> |
| 216 |
<a class="ansibleOptionLink" href="#parameter-format" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p> |
| 217 |
</div></td> |
| 218 |
<td><div class="ansible-option-cell"><p>Save image to docker-archive, oci-archive (see containers-transports(5)), oci-dir (oci transport), or docker-dir (dir transport with v2s2 manifest type).</p> |
| 219 |
<p class="ansible-option-line"><strong class="ansible-option-choices">Choices:</strong></p> |
| 220 |
<ul class="simple"> |
| 221 |
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">"docker-archive"</span></code></p></li> |
| 222 |
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">"oci-archive"</span></code></p></li> |
| 223 |
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">"oci-dir"</span></code></p></li> |
| 224 |
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">"docker-dir"</span></code></p></li> |
| 225 |
</ul> |
| 226 |
</div></td> |
| 227 |
</tr> |
| 228 |
<tr class="row-odd"><td><div class="ansible-option-cell"> |
| 229 |
<div class="ansibleOptionAnchor" id="parameter-image"></div><p class="ansible-option-title" id="ansible-collections-containers-podman-podman-save-module-parameter-image"><strong>image</strong></p> |
| 230 |
<a class="ansibleOptionLink" href="#parameter-image" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">list</span> / <span class="ansible-option-elements">elements=string</span> / <span class="ansible-option-required">required</span></p> |
| 231 |
</div></td> |
| 232 |
<td><div class="ansible-option-cell"><p>Image to save.</p> |
| 233 |
</div></td> |
| 234 |
</tr> |
| 235 |
<tr class="row-even"><td><div class="ansible-option-cell"> |
| 236 |
<div class="ansibleOptionAnchor" id="parameter-multi_image_archive"></div><p class="ansible-option-title" id="ansible-collections-containers-podman-podman-save-module-parameter-multi-image-archive"><strong>multi_image_archive</strong></p> |
| 237 |
<a class="ansibleOptionLink" href="#parameter-multi_image_archive" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p> |
| 238 |
</div></td> |
| 239 |
<td><div class="ansible-option-cell"><p>Allow for creating archives with more than one image. Additional names will be interpreted as images instead of tags. Only supported for docker-archive.</p> |
| 240 |
<p class="ansible-option-line"><strong class="ansible-option-choices">Choices:</strong></p> |
| 241 |
<ul class="simple"> |
| 242 |
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">false</span></code></p></li> |
| 243 |
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">true</span></code></p></li> |
| 244 |
</ul> |
| 245 |
</div></td> |
| 246 |
</tr> |
| 247 |
</tbody> |
| 248 |
</table> |
| 249 |
</section> |
| 250 |
<section id="examples"> |
| 251 |
<h2><a class="toc-backref" href="#id4" role="doc-backlink">Examples</a><a class="headerlink" href="#examples" title="Link to this heading"></a></h2> |
| 252 |
<div class="highlight-yaml+jinja notranslate"><div class="highlight"><pre><span></span><span class="c1"># What modules does for example</span> |
| 253 |
<span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">containers.podman.podman_save</span><span class="p">:</span> |
| 254 |
<span class="w"> </span><span class="nt">image</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">nginx</span> |
| 255 |
<span class="w"> </span><span class="nt">dest</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">/tmp/file123.tar</span> |
| 256 |
<span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">containers.podman.podman_save</span><span class="p">:</span> |
| 257 |
<span class="w"> </span><span class="nt">image</span><span class="p">:</span> |
| 258 |
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">nginx</span> |
| 259 |
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">fedora</span> |
| 260 |
<span class="w"> </span><span class="nt">dest</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">/tmp/file456.tar</span> |
| 261 |
<span class="w"> </span><span class="nt">multi_image_archive</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span> |
| 262 |
</pre></div> |
| 263 |
</div> |
| 264 |
<section id="authors"> |
| 265 |
<h3>Authors<a class="headerlink" href="#authors" title="Link to this heading"></a></h3> |
| 266 |
<ul class="simple"> |
| 267 |
<li><p>Sagi Shnaidman (@sshnaidm)</p></li> |
| 268 |
</ul> |
| 269 |
</section> |
| 270 |
<section id="collection-links"> |
| 271 |
<h3>Collection links<a class="headerlink" href="#collection-links" title="Link to this heading"></a></h3> |
| 272 |
<ul class="ansible-links"> |
| 273 |
<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> |
| 274 |
<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> |
| 275 |
</ul> |
| 276 |
</section> |
| 277 |
</section> |
| 278 |
</section> |
| 279 |
|
| 280 |
|
| 281 |
</div> |
| 282 |
</div> |
| 283 |
|
| 284 |
|
| 285 |
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer"> |
| 286 |
<a href="podman_runlabel_module.html" class="btn btn-neutral float-left" title="containers.podman.podman_runlabel module – Run given label from given image" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a> |
| 287 |
<a href="podman_search_module.html" class="btn btn-neutral float-right" title="containers.podman.podman_search module – Search for remote images using podman" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a> |
| 288 |
</div> |
| 289 |
|
| 290 |
<hr/> |
| 291 |
|
| 292 |
<div role="contentinfo"> |
| 293 |
<p>© Copyright Ansible contributors.</p> |
| 294 |
</div> |
| 295 |
|
| 296 |
|
| 297 |
|
| 298 |
|
| 299 |
</footer> |
| 300 |
</div> |
| 301 |
</div> |
| 302 |
</section> |
| 303 |
</div> |
| 304 |
<script> |
| 305 |
jQuery(function () { |
| 306 |
SphinxRtdTheme.Navigation.enable(true); |
| 307 |
}); |
| 308 |
</script><!-- extra footer elements for Ansible beyond RTD Sphinx Theme --> |
| 309 |
|
| 310 |
</body> |
| 311 |
</html> |