mirror of
https://github.com/ansible-collections/community.docker.git
synced 2025-12-15 19:42:06 +00:00
497 lines
49 KiB
HTML
497 lines
49 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 name="viewport" content="width=device-width, initial-scale=1.0" />
|
||
<title>Docker Guide — Community.Docker Collection 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=b54c304f" />
|
||
<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="community.docker.current_container_facts module – Return facts about whether the module runs in a container" href="../current_container_facts_module.html" />
|
||
<link rel="prev" title="Community.Docker Release Notes" href="../changelog.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="https://ansible-collections.github.io/community.docker/branch/main/" style="padding-bottom: 30px;">
|
||
|
||
<img class="DocSiteNav-logo"
|
||
src="../_static/images/Ansible-Mark-RGB_White.png"
|
||
alt="Ansible Logo">
|
||
<div class="DocSiteNav-title">Community.Docker Collection Docs</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">
|
||
Community.Docker Collection
|
||
</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">
|
||
|
||
<ul>
|
||
<li class="toctree-l1"><a class="reference internal" href="../changelog.html">Community.Docker Release Notes</a></li>
|
||
</ul>
|
||
<ul class="current">
|
||
<li class="toctree-l1 current"><a class="current reference internal" href="#">Docker Guide</a><ul>
|
||
<li class="toctree-l2"><a class="reference internal" href="#requirements">Requirements</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="#connecting-to-the-docker-api">Connecting to the Docker API</a><ul>
|
||
<li class="toctree-l3"><a class="reference internal" href="#parameters">Parameters</a></li>
|
||
<li class="toctree-l3"><a class="reference internal" href="#module-default-group">Module default group</a></li>
|
||
<li class="toctree-l3"><a class="reference internal" href="#environment-variables">Environment variables</a></li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l2"><a class="reference internal" href="#plain-docker-daemon-images-networks-volumes-and-containers">Plain Docker daemon: images, networks, volumes, and containers</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="#docker-compose">Docker Compose</a><ul>
|
||
<li class="toctree-l3"><a class="reference internal" href="#docker-compose-v2">Docker Compose v2</a></li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l2"><a class="reference internal" href="#docker-machine">Docker Machine</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="#docker-swarm-stack">Docker Swarm stack</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="#docker-swarm">Docker Swarm</a><ul>
|
||
<li class="toctree-l3"><a class="reference internal" href="#swarm-management">Swarm management</a></li>
|
||
<li class="toctree-l3"><a class="reference internal" href="#configuration-management">Configuration management</a></li>
|
||
<li class="toctree-l3"><a class="reference internal" href="#swarm-services">Swarm services</a></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
<ul>
|
||
<li class="toctree-l1"><a class="reference internal" href="../current_container_facts_module.html">community.docker.current_container_facts module – Return facts about whether the module runs in a container</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../docker_compose_v2_module.html">community.docker.docker_compose_v2 module – Manage multi-container Docker applications with Docker Compose CLI plugin</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../docker_compose_v2_exec_module.html">community.docker.docker_compose_v2_exec module – Run command in a container of a Compose service</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../docker_compose_v2_pull_module.html">community.docker.docker_compose_v2_pull module – Pull a Docker compose project</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../docker_compose_v2_run_module.html">community.docker.docker_compose_v2_run module – Run command in a new container of a Compose service</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../docker_config_module.html">community.docker.docker_config module – Manage docker configs</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../docker_container_module.html">community.docker.docker_container module – manage Docker containers</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../docker_container_copy_into_module.html">community.docker.docker_container_copy_into module – Copy a file into a Docker container</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../docker_container_exec_module.html">community.docker.docker_container_exec module – Execute command in a docker container</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../docker_container_info_module.html">community.docker.docker_container_info module – Retrieves facts about docker container</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../docker_context_info_module.html">community.docker.docker_context_info module – Retrieve information on Docker contexts for the current user</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../docker_host_info_module.html">community.docker.docker_host_info module – Retrieves facts about docker host and lists of objects of the services</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../docker_image_module.html">community.docker.docker_image module – Manage docker images</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../docker_image_build_module.html">community.docker.docker_image_build module – Build Docker images using Docker buildx</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../docker_image_export_module.html">community.docker.docker_image_export module – Export (archive) Docker images</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../docker_image_info_module.html">community.docker.docker_image_info module – Inspect docker images</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../docker_image_load_module.html">community.docker.docker_image_load module – Load docker image(s) from archives</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../docker_image_pull_module.html">community.docker.docker_image_pull module – Pull Docker images from registries</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../docker_image_push_module.html">community.docker.docker_image_push module – Push Docker images to registries</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../docker_image_remove_module.html">community.docker.docker_image_remove module – Remove Docker images</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../docker_image_tag_module.html">community.docker.docker_image_tag module – Tag Docker images with new names and/or tags</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../docker_login_module.html">community.docker.docker_login module – Log into a Docker registry</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../docker_network_module.html">community.docker.docker_network module – Manage Docker networks</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../docker_network_info_module.html">community.docker.docker_network_info module – Retrieves facts about docker network</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../docker_node_module.html">community.docker.docker_node module – Manage Docker Swarm node</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../docker_node_info_module.html">community.docker.docker_node_info module – Retrieves facts about docker swarm node from Swarm Manager</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../docker_plugin_module.html">community.docker.docker_plugin module – Manage Docker plugins</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../docker_prune_module.html">community.docker.docker_prune module – Allows to prune various docker objects</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../docker_secret_module.html">community.docker.docker_secret module – Manage docker secrets</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../docker_stack_module.html">community.docker.docker_stack module – docker stack module</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../docker_stack_info_module.html">community.docker.docker_stack_info module – Return information on all docker stacks</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../docker_stack_task_info_module.html">community.docker.docker_stack_task_info module – Return information of the tasks on a docker stack</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../docker_swarm_module.html">community.docker.docker_swarm module – Manage Swarm cluster</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../docker_swarm_info_module.html">community.docker.docker_swarm_info module – Retrieves facts about Docker Swarm cluster</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../docker_swarm_service_module.html">community.docker.docker_swarm_service module – docker swarm service</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../docker_swarm_service_info_module.html">community.docker.docker_swarm_service_info module – Retrieves information about docker services from a Swarm Manager</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../docker_volume_module.html">community.docker.docker_volume module – Manage Docker volumes</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../docker_volume_info_module.html">community.docker.docker_volume_info module – Retrieve facts about Docker volumes</a></li>
|
||
</ul>
|
||
<ul>
|
||
<li class="toctree-l1"><a class="reference internal" href="../docker_connection.html">community.docker.docker connection – Run tasks in docker containers</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../docker_api_connection.html">community.docker.docker_api connection – Run tasks in docker containers</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../nsenter_connection.html">community.docker.nsenter connection – execute on host running controller container</a></li>
|
||
</ul>
|
||
<ul>
|
||
<li class="toctree-l1"><a class="reference internal" href="../docker_containers_inventory.html">community.docker.docker_containers inventory – Ansible dynamic inventory plugin for Docker containers</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../docker_machine_inventory.html">community.docker.docker_machine inventory – Docker Machine inventory source</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../docker_swarm_inventory.html">community.docker.docker_swarm inventory – Ansible dynamic inventory plugin for Docker swarm nodes</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">Community.Docker Collection</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 active">Docker Guide</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">
|
||
|
||
<section id="docker-guide">
|
||
<span id="ansible-collections-community-docker-docsite-scenario-guide"></span><h1>Docker Guide<a class="headerlink" href="#docker-guide" title="Link to this heading"></a></h1>
|
||
<p>The <a class="reference external" href="https://galaxy.ansible.com/ui/repo/published/community/docker/">community.docker collection</a> offers several modules and plugins for orchestrating Docker containers and Docker Swarm.</p>
|
||
<nav class="contents local" id="contents">
|
||
<ul class="simple">
|
||
<li><p><a class="reference internal" href="#requirements" id="id1">Requirements</a></p></li>
|
||
<li><p><a class="reference internal" href="#connecting-to-the-docker-api" id="id2">Connecting to the Docker API</a></p></li>
|
||
<li><p><a class="reference internal" href="#plain-docker-daemon-images-networks-volumes-and-containers" id="id3">Plain Docker daemon: images, networks, volumes, and containers</a></p></li>
|
||
<li><p><a class="reference internal" href="#docker-compose" id="id4">Docker Compose</a></p></li>
|
||
<li><p><a class="reference internal" href="#docker-machine" id="id5">Docker Machine</a></p></li>
|
||
<li><p><a class="reference internal" href="#docker-swarm-stack" id="id6">Docker Swarm stack</a></p></li>
|
||
<li><p><a class="reference internal" href="#docker-swarm" id="id7">Docker Swarm</a></p></li>
|
||
</ul>
|
||
</nav>
|
||
<section id="requirements">
|
||
<h2><a class="toc-backref" href="#id1" role="doc-backlink">Requirements</a><a class="headerlink" href="#requirements" title="Link to this heading"></a></h2>
|
||
<p>Most of the modules and plugins in community.docker require the <a class="reference external" href="https://docker-py.readthedocs.io/en/stable/">Docker SDK for Python</a>. The SDK needs to be installed on the machines where the modules and plugins are executed, and for the Python version(s) with which the modules and plugins are executed. You can use the <a class="reference external" href="https://docs.ansible.com/projects/ansible/devel/collections/community/general/python_requirements_info_module.html#ansible-collections-community-general-python-requirements-info-module" title="(in Ansible vdevel)"><span>community.general.python_requirements_info module</span></a> to make sure that the Docker SDK for Python is installed on the correct machine and for the Python version used by Ansible.</p>
|
||
<p>Note that plugins (inventory plugins and connection plugins) are always executed in the context of Ansible itself. If you use a plugin that requires the Docker SDK for Python, you need to install it on the machine running <code class="docutils literal notranslate"><span class="pre">ansible</span></code> or <code class="docutils literal notranslate"><span class="pre">ansible-playbook</span></code> and for the same Python interpreter used by Ansible. To see which Python is used, run <code class="docutils literal notranslate"><span class="pre">ansible</span> <span class="pre">--version</span></code>.</p>
|
||
<p>You can install the Docker SDK for Python for Python 3.6 or later as follows:</p>
|
||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>pip<span class="w"> </span>install<span class="w"> </span>docker
|
||
</pre></div>
|
||
</div>
|
||
<p>For Python 2.7, you need to use a version between 2.0.0 and 4.4.4 since the Python package for Docker removed support for Python 2.7 on 5.0.0. You can install the specific version of the Docker SDK for Python as follows:</p>
|
||
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>pip<span class="w"> </span>install<span class="w"> </span><span class="s1">'docker==4.4.4'</span>
|
||
</pre></div>
|
||
</div>
|
||
<p>Note that the Docker SDK for Python was called <code class="docutils literal notranslate"><span class="pre">docker-py</span></code> on PyPi before version 2.0.0. Please avoid installing this really old version, and make sure to not install both <code class="docutils literal notranslate"><span class="pre">docker</span></code> and <code class="docutils literal notranslate"><span class="pre">docker-py</span></code>. Installing both will result in a broken installation. If this happens, Ansible will detect it and inform you about it. If that happens, you must uninstall both and reinstall the correct version. If in doubt, always install <code class="docutils literal notranslate"><span class="pre">docker</span></code> and never <code class="docutils literal notranslate"><span class="pre">docker-py</span></code>.</p>
|
||
</section>
|
||
<section id="connecting-to-the-docker-api">
|
||
<h2><a class="toc-backref" href="#id2" role="doc-backlink">Connecting to the Docker API</a><a class="headerlink" href="#connecting-to-the-docker-api" title="Link to this heading"></a></h2>
|
||
<p>You can connect to a local or remote API using parameters passed to each task or by setting environment variables. The order of precedence is command line parameters and then environment variables. If neither a command line option nor an environment variable is found, Ansible uses the default value provided under <a class="reference internal" href="#parameters">Parameters</a>.</p>
|
||
<section id="parameters">
|
||
<h3>Parameters<a class="headerlink" href="#parameters" title="Link to this heading"></a></h3>
|
||
<p>Most plugins and modules can be configured by the following parameters:</p>
|
||
<blockquote>
|
||
<div><dl>
|
||
<dt>docker_host</dt><dd><p>The URL or Unix socket path used to connect to the Docker API. Defaults to <code class="docutils literal notranslate"><span class="pre">unix:///var/run/docker.sock</span></code>. To connect to a remote host, provide the TCP connection string (for example: <code class="docutils literal notranslate"><span class="pre">tcp://192.0.2.23:2376</span></code>). If TLS is used to encrypt the connection to the API, then the module will automatically replace <code class="docutils literal notranslate"><span class="pre">tcp</span></code> in the connection URL with <code class="docutils literal notranslate"><span class="pre">https</span></code>.</p>
|
||
</dd>
|
||
<dt>api_version</dt><dd><p>The version of the Docker API running on the Docker Host. Defaults to the latest version of the API supported by the Docker SDK for Python installed.</p>
|
||
</dd>
|
||
<dt>timeout</dt><dd><p>The maximum amount of time in seconds to wait on a response from the API. Defaults to 60 seconds.</p>
|
||
</dd>
|
||
<dt>tls</dt><dd><p>Secure the connection to the API by using TLS without verifying the authenticity of the Docker host server. Defaults to <code class="docutils literal notranslate"><span class="pre">false</span></code>.</p>
|
||
</dd>
|
||
<dt>validate_certs</dt><dd><p>Secure the connection to the API by using TLS and verifying the authenticity of the Docker host server. Default is <code class="docutils literal notranslate"><span class="pre">false</span></code>.</p>
|
||
</dd>
|
||
<dt>ca_path</dt><dd><p>Use a CA certificate when performing server verification by providing the path to a CA certificate file.</p>
|
||
</dd>
|
||
<dt>cert_path</dt><dd><p>Path to the client’s TLS certificate file.</p>
|
||
</dd>
|
||
<dt>key_path</dt><dd><p>Path to the client’s TLS key file.</p>
|
||
</dd>
|
||
<dt>tls_hostname</dt><dd><p>When verifying the authenticity of the Docker Host server, provide the expected name of the server. Defaults to <code class="docutils literal notranslate"><span class="pre">localhost</span></code>.</p>
|
||
</dd>
|
||
<dt>ssl_version</dt><dd><p>Provide a valid SSL version number. The default value is determined by the Docker SDK for Python.</p>
|
||
<p>This option is not available for the CLI based plugins. It is mainly needed for legacy systems and should be avoided.</p>
|
||
</dd>
|
||
</dl>
|
||
</div></blockquote>
|
||
</section>
|
||
<section id="module-default-group">
|
||
<h3>Module default group<a class="headerlink" href="#module-default-group" title="Link to this heading"></a></h3>
|
||
<p>To avoid having to specify common parameters for all the modules in every task, you can use the <code class="docutils literal notranslate"><span class="pre">community.docker.docker</span></code> <a class="reference external" href="https://docs.ansible.com/projects/ansible/devel/playbook_guide/playbooks_module_defaults.html#module-defaults-groups" title="(in Ansible vdevel)"><span class="xref std std-ref">module defaults group</span></a>, or its short name <code class="docutils literal notranslate"><span class="pre">docker</span></code>.</p>
|
||
<div class="admonition note">
|
||
<p class="admonition-title">Note</p>
|
||
<p>Module default groups only work for modules, not for plugins (connection and inventory plugins).</p>
|
||
</div>
|
||
<p>The following example shows how the module default group can be used in a playbook:</p>
|
||
<div class="highlight-yaml+jinja notranslate"><div class="highlight"><pre><span></span><span class="nn">---</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">Pull image and start the container</span>
|
||
<span class="w"> </span><span class="nt">hosts</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">localhost</span>
|
||
<span class="w"> </span><span class="nt">gather_facts</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">false</span>
|
||
<span class="w"> </span><span class="nt">module_defaults</span><span class="p">:</span>
|
||
<span class="w"> </span><span class="nt">group/community.docker.docker</span><span class="p">:</span>
|
||
<span class="w"> </span><span class="c1"># Select Docker Daemon on other host</span>
|
||
<span class="w"> </span><span class="nt">docker_host</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">tcp://192.0.2.23:2376</span>
|
||
<span class="w"> </span><span class="c1"># Configure TLS</span>
|
||
<span class="w"> </span><span class="nt">tls</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
|
||
<span class="w"> </span><span class="nt">validate_certs</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
|
||
<span class="w"> </span><span class="nt">tls_hostname</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">docker.example.com</span>
|
||
<span class="w"> </span><span class="nt">ca_path</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">/path/to/cacert.pem</span>
|
||
<span class="w"> </span><span class="c1"># Increase timeout</span>
|
||
<span class="w"> </span><span class="nt">timeout</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">120</span>
|
||
<span class="w"> </span><span class="nt">tasks</span><span class="p">:</span>
|
||
<span class="w"> </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">Pull image</span>
|
||
<span class="w"> </span><span class="nt">community.docker.docker_image_pull</span><span class="p">:</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">python</span>
|
||
<span class="w"> </span><span class="nt">tag</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">3.12</span>
|
||
|
||
<span class="w"> </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">Start container</span>
|
||
<span class="w"> </span><span class="nt">community.docker.docker_container</span><span class="p">:</span>
|
||
<span class="w"> </span><span class="nt">cleanup</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
|
||
<span class="w"> </span><span class="nt">command</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">python --version</span>
|
||
<span class="w"> </span><span class="nt">detach</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">false</span>
|
||
<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">python:3.12</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">my-python-container</span>
|
||
<span class="w"> </span><span class="nt">output_logs</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
|
||
|
||
<span class="w"> </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">Show output</span>
|
||
<span class="w"> </span><span class="nt">ansible.builtin.debug</span><span class="p">:</span>
|
||
<span class="w"> </span><span class="nt">msg</span><span class="p">:</span><span class="w"> </span><span class="s">"</span><span class="cp">{{</span> <span class="nv">output.container.Output</span> <span class="cp">}}</span><span class="s">"</span>
|
||
</pre></div>
|
||
</div>
|
||
<p>Here the two <code class="docutils literal notranslate"><span class="pre">community.docker</span></code> tasks will use the options set for the module defaults group.</p>
|
||
</section>
|
||
<section id="environment-variables">
|
||
<h3>Environment variables<a class="headerlink" href="#environment-variables" title="Link to this heading"></a></h3>
|
||
<p>You can also control how the plugins and modules connect to the Docker API by setting the following environment variables.</p>
|
||
<p>For plugins, they have to be set for the environment Ansible itself runs in. For modules, they have to be set for the environment the modules are executed in. For modules running on remote machines, the environment variables have to be set on that machine for the user used to execute the modules with.</p>
|
||
<dl class="std envvar">
|
||
<dt class="sig sig-object std" id="envvar-DOCKER_HOST">
|
||
<span class="sig-name descname"><span class="pre">DOCKER_HOST</span></span><a class="headerlink" href="#envvar-DOCKER_HOST" title="Link to this definition"></a></dt>
|
||
<dd><p>The URL or Unix socket path used to connect to the Docker API.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="std envvar">
|
||
<dt class="sig sig-object std" id="envvar-DOCKER_API_VERSION">
|
||
<span class="sig-name descname"><span class="pre">DOCKER_API_VERSION</span></span><a class="headerlink" href="#envvar-DOCKER_API_VERSION" title="Link to this definition"></a></dt>
|
||
<dd><p>The version of the Docker API running on the Docker Host. Defaults to the latest version of the API supported
|
||
by Docker SDK for Python.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="std envvar">
|
||
<dt class="sig sig-object std" id="envvar-DOCKER_TIMEOUT">
|
||
<span class="sig-name descname"><span class="pre">DOCKER_TIMEOUT</span></span><a class="headerlink" href="#envvar-DOCKER_TIMEOUT" title="Link to this definition"></a></dt>
|
||
<dd><p>The maximum amount of time in seconds to wait on a response from the API.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="std envvar">
|
||
<dt class="sig sig-object std" id="envvar-DOCKER_CERT_PATH">
|
||
<span class="sig-name descname"><span class="pre">DOCKER_CERT_PATH</span></span><a class="headerlink" href="#envvar-DOCKER_CERT_PATH" title="Link to this definition"></a></dt>
|
||
<dd><p>Path to the directory containing the client certificate, client key and CA certificate.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="std envvar">
|
||
<dt class="sig sig-object std" id="envvar-DOCKER_SSL_VERSION">
|
||
<span class="sig-name descname"><span class="pre">DOCKER_SSL_VERSION</span></span><a class="headerlink" href="#envvar-DOCKER_SSL_VERSION" title="Link to this definition"></a></dt>
|
||
<dd><p>Provide a valid SSL version number.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="std envvar">
|
||
<dt class="sig sig-object std" id="envvar-DOCKER_TLS">
|
||
<span class="sig-name descname"><span class="pre">DOCKER_TLS</span></span><a class="headerlink" href="#envvar-DOCKER_TLS" title="Link to this definition"></a></dt>
|
||
<dd><p>Secure the connection to the API by using TLS without verifying the authenticity of the Docker Host.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="std envvar">
|
||
<dt class="sig sig-object std" id="envvar-DOCKER_TLS_HOSTNAME">
|
||
<span class="sig-name descname"><span class="pre">DOCKER_TLS_HOSTNAME</span></span><a class="headerlink" href="#envvar-DOCKER_TLS_HOSTNAME" title="Link to this definition"></a></dt>
|
||
<dd><p>When verifying the authenticity of the Docker Host, uses this hostname to compare to the host’s certificate.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="std envvar">
|
||
<dt class="sig sig-object std" id="envvar-DOCKER_TLS_VERIFY">
|
||
<span class="sig-name descname"><span class="pre">DOCKER_TLS_VERIFY</span></span><a class="headerlink" href="#envvar-DOCKER_TLS_VERIFY" title="Link to this definition"></a></dt>
|
||
<dd><p>Secure the connection to the API by using TLS and verify the authenticity of the Docker Host.</p>
|
||
</dd></dl>
|
||
|
||
</section>
|
||
</section>
|
||
<section id="plain-docker-daemon-images-networks-volumes-and-containers">
|
||
<h2><a class="toc-backref" href="#id3" role="doc-backlink">Plain Docker daemon: images, networks, volumes, and containers</a><a class="headerlink" href="#plain-docker-daemon-images-networks-volumes-and-containers" title="Link to this heading"></a></h2>
|
||
<p>For working with a plain Docker daemon, that is without Swarm, there are connection plugins, an inventory plugin, and several modules available:</p>
|
||
<blockquote>
|
||
<div><dl>
|
||
<dt>docker connection plugin</dt><dd><p>The <a class="reference internal" href="../docker_connection.html#ansible-collections-community-docker-docker-connection"><span class="std std-ref">community.docker.docker connection plugin</span></a> uses the Docker CLI utility to connect to Docker containers and execute modules in them. It essentially wraps <code class="docutils literal notranslate"><span class="pre">docker</span> <span class="pre">exec</span></code> and <code class="docutils literal notranslate"><span class="pre">docker</span> <span class="pre">cp</span></code>. This connection plugin is supported by the <a class="reference external" href="https://docs.ansible.com/projects/ansible/devel/collections/ansible/posix/synchronize_module.html#ansible-collections-ansible-posix-synchronize-module" title="(in Ansible vdevel)"><span>ansible.posix.synchronize module</span></a>.</p>
|
||
</dd>
|
||
<dt>docker_api connection plugin</dt><dd><p>The <a class="reference internal" href="../docker_api_connection.html#ansible-collections-community-docker-docker-api-connection"><span class="std std-ref">community.docker.docker_api connection plugin</span></a> talks directly to the Docker daemon to connect to Docker containers and execute modules in them.</p>
|
||
</dd>
|
||
<dt>docker_containers inventory plugin</dt><dd><p>The <a class="reference internal" href="../docker_containers_inventory.html#ansible-collections-community-docker-docker-containers-inventory"><span class="std std-ref">community.docker.docker_containers inventory plugin</span></a> allows you to dynamically add Docker containers from a Docker Daemon to your Ansible inventory. See <a class="reference external" href="https://docs.ansible.com/projects/ansible/devel/inventory_guide/intro_dynamic_inventory.html#dynamic-inventory" title="(in Ansible vdevel)"><span>Working with dynamic inventory</span></a> for details on dynamic inventories.</p>
|
||
<p>The <a class="reference external" href="https://github.com/ansible-community/contrib-scripts/blob/main/inventory/docker.py">docker inventory script</a> is deprecated. Please use the inventory plugin instead. The inventory plugin has several compatibility options. If you need to collect Docker containers from multiple Docker daemons, you need to add every Docker daemon as an individual inventory source.</p>
|
||
</dd>
|
||
<dt>docker_host_info module</dt><dd><p>The <a class="reference internal" href="../docker_host_info_module.html#ansible-collections-community-docker-docker-host-info-module"><span class="std std-ref">community.docker.docker_host_info module</span></a> allows you to retrieve information on a Docker daemon, such as all containers, images, volumes, networks and so on.</p>
|
||
</dd>
|
||
<dt>docker_login module</dt><dd><p>The <a class="reference internal" href="../docker_login_module.html#ansible-collections-community-docker-docker-login-module"><span class="std std-ref">community.docker.docker_login module</span></a> allows you to log in and out of a remote registry, such as Docker Hub or a private registry. It provides similar functionality to the <code class="docutils literal notranslate"><span class="pre">docker</span> <span class="pre">login</span></code> and <code class="docutils literal notranslate"><span class="pre">docker</span> <span class="pre">logout</span></code> CLI commands.</p>
|
||
</dd>
|
||
<dt>docker_prune module</dt><dd><p>The <a class="reference internal" href="../docker_prune_module.html#ansible-collections-community-docker-docker-prune-module"><span class="std std-ref">community.docker.docker_prune module</span></a> allows you to prune no longer needed containers, images, volumes and so on. It provides similar functionality to the <code class="docutils literal notranslate"><span class="pre">docker</span> <span class="pre">prune</span></code> CLI command.</p>
|
||
</dd>
|
||
<dt>docker_image module</dt><dd><p>The <a class="reference internal" href="../docker_image_module.html#ansible-collections-community-docker-docker-image-module"><span class="std std-ref">community.docker.docker_image module</span></a> provides full control over images, including: build, pull, push, tag and remove.</p>
|
||
</dd>
|
||
<dt>docker_image_build</dt><dd><p>The <a class="reference internal" href="../docker_image_build_module.html#ansible-collections-community-docker-docker-image-build-module"><span class="std std-ref">community.docker.docker_image_build module</span></a> allows you to build a Docker image using Docker buildx.</p>
|
||
</dd>
|
||
<dt>docker_image_export module</dt><dd><p>The <a class="reference internal" href="../docker_image_export_module.html#ansible-collections-community-docker-docker-image-export-module"><span class="std std-ref">community.docker.docker_image_export module</span></a> allows you to export (archive) images.</p>
|
||
</dd>
|
||
<dt>docker_image_info module</dt><dd><p>The <a class="reference internal" href="../docker_image_info_module.html#ansible-collections-community-docker-docker-image-info-module"><span class="std std-ref">community.docker.docker_image_info module</span></a> allows you to list and inspect images.</p>
|
||
</dd>
|
||
<dt>docker_image_load</dt><dd><p>The <a class="reference internal" href="../docker_image_load_module.html#ansible-collections-community-docker-docker-image-load-module"><span class="std std-ref">community.docker.docker_image_load module</span></a> allows you to import one or multiple images from tarballs.</p>
|
||
</dd>
|
||
<dt>docker_image_pull</dt><dd><p>The <a class="reference internal" href="../docker_image_pull_module.html#ansible-collections-community-docker-docker-image-pull-module"><span class="std std-ref">community.docker.docker_image_pull module</span></a> allows you to pull a Docker image from a registry.</p>
|
||
</dd>
|
||
<dt>docker_image_push</dt><dd><p>The <a class="reference internal" href="../docker_image_push_module.html#ansible-collections-community-docker-docker-image-push-module"><span class="std std-ref">community.docker.docker_image_push module</span></a> allows you to push a Docker image to a registry.</p>
|
||
</dd>
|
||
<dt>docker_image_remove</dt><dd><p>The <a class="reference internal" href="../docker_image_remove_module.html#ansible-collections-community-docker-docker-image-remove-module"><span class="std std-ref">community.docker.docker_image_remove module</span></a> allows you to remove and/or untag a Docker image from the Docker daemon.</p>
|
||
</dd>
|
||
<dt>docker_image_tag</dt><dd><p>The <a class="reference internal" href="../docker_image_tag_module.html#ansible-collections-community-docker-docker-image-tag-module"><span class="std std-ref">community.docker.docker_image_tag module</span></a> allows you to tag a Docker image with additional names and/or tags.</p>
|
||
</dd>
|
||
<dt>docker_network module</dt><dd><p>The <a class="reference internal" href="../docker_network_module.html#ansible-collections-community-docker-docker-network-module"><span class="std std-ref">community.docker.docker_network module</span></a> provides full control over Docker networks.</p>
|
||
</dd>
|
||
<dt>docker_network_info module</dt><dd><p>The <a class="reference internal" href="../docker_network_info_module.html#ansible-collections-community-docker-docker-network-info-module"><span class="std std-ref">community.docker.docker_network_info module</span></a> allows you to inspect Docker networks.</p>
|
||
</dd>
|
||
<dt>docker_volume_info module</dt><dd><p>The <a class="reference internal" href="../docker_volume_info_module.html#ansible-collections-community-docker-docker-volume-info-module"><span class="std std-ref">community.docker.docker_volume_info module</span></a> provides full control over Docker volumes.</p>
|
||
</dd>
|
||
<dt>docker_volume module</dt><dd><p>The <a class="reference internal" href="../docker_volume_module.html#ansible-collections-community-docker-docker-volume-module"><span class="std std-ref">community.docker.docker_volume module</span></a> allows you to inspect Docker volumes.</p>
|
||
</dd>
|
||
<dt>docker_container module</dt><dd><p>The <a class="reference internal" href="../docker_container_module.html#ansible-collections-community-docker-docker-container-module"><span class="std std-ref">community.docker.docker_container module</span></a> manages the container lifecycle by providing the ability to create, update, stop, start and destroy a Docker container.</p>
|
||
</dd>
|
||
<dt>docker_container_copy_into</dt><dd><p>The <a class="reference internal" href="../docker_container_copy_into_module.html#ansible-collections-community-docker-docker-container-copy-into-module"><span class="std std-ref">community.docker.docker_container_copy_into module</span></a> allows you to copy files from the control node into a container.</p>
|
||
</dd>
|
||
<dt>docker_container_exec</dt><dd><p>The <a class="reference internal" href="../docker_container_exec_module.html#ansible-collections-community-docker-docker-container-exec-module"><span class="std std-ref">community.docker.docker_container_exec module</span></a> allows you to execute commands in a running container.</p>
|
||
</dd>
|
||
<dt>docker_container_info module</dt><dd><p>The <a class="reference internal" href="../docker_container_info_module.html#ansible-collections-community-docker-docker-container-info-module"><span class="std std-ref">community.docker.docker_container_info module</span></a> allows you to inspect a Docker container.</p>
|
||
</dd>
|
||
<dt>docker_plugin</dt><dd><p>The <a class="reference internal" href="../docker_plugin_module.html#ansible-collections-community-docker-docker-plugin-module"><span class="std std-ref">community.docker.docker_plugin module</span></a> allows you to manage Docker plugins.</p>
|
||
</dd>
|
||
</dl>
|
||
</div></blockquote>
|
||
</section>
|
||
<section id="docker-compose">
|
||
<h2><a class="toc-backref" href="#id4" role="doc-backlink">Docker Compose</a><a class="headerlink" href="#docker-compose" title="Link to this heading"></a></h2>
|
||
<section id="docker-compose-v2">
|
||
<h3>Docker Compose v2<a class="headerlink" href="#docker-compose-v2" title="Link to this heading"></a></h3>
|
||
<p>There are several modules for working with Docker Compose projects:</p>
|
||
<blockquote>
|
||
<div><dl class="simple">
|
||
<dt>community.docker.docker_compose_v2</dt><dd><p>The <a class="reference internal" href="../docker_compose_v2_module.html#ansible-collections-community-docker-docker-compose-v2-module"><span class="std std-ref">community.docker.docker_compose_v2 module</span></a> allows you to use your existing Docker Compose files to orchestrate containers on a single Docker daemon or on Swarm.</p>
|
||
</dd>
|
||
<dt>community.docker.docker_compose_v2_exec</dt><dd><p>The <a class="reference internal" href="../docker_compose_v2_exec_module.html#ansible-collections-community-docker-docker-compose-v2-exec-module"><span class="std std-ref">community.docker.docker_compose_v2_exec module</span></a> allows you to run a command in a container of Docker Compose projects.</p>
|
||
</dd>
|
||
<dt>community.docker.docker_compose_v2_pull</dt><dd><p>The <a class="reference internal" href="../docker_compose_v2_pull_module.html#ansible-collections-community-docker-docker-compose-v2-pull-module"><span class="std std-ref">community.docker.docker_compose_v2_pull module</span></a> allows you to pull Docker Compose projects.</p>
|
||
</dd>
|
||
<dt>community.docker.docker_compose_v2_run</dt><dd><p>The <a class="reference internal" href="../docker_compose_v2_run_module.html#ansible-collections-community-docker-docker-compose-v2-run-module"><span class="std std-ref">community.docker.docker_compose_v2_run module</span></a> allows you to run a command in a new container of a Docker Compose project.</p>
|
||
</dd>
|
||
</dl>
|
||
</div></blockquote>
|
||
<p>These modules use the Docker CLI “compose” plugin (<code class="docutils literal notranslate"><span class="pre">docker</span> <span class="pre">compose</span></code>), and thus needs access to the Docker CLI tool.
|
||
No further requirements next to to the CLI tool and its Docker Compose plugin are needed.</p>
|
||
</section>
|
||
</section>
|
||
<section id="docker-machine">
|
||
<h2><a class="toc-backref" href="#id5" role="doc-backlink">Docker Machine</a><a class="headerlink" href="#docker-machine" title="Link to this heading"></a></h2>
|
||
<p>The <a class="reference internal" href="../docker_machine_inventory.html#ansible-collections-community-docker-docker-machine-inventory"><span class="std std-ref">community.docker.docker_machine inventory plugin</span></a> allows you to dynamically add Docker Machine hosts to your Ansible inventory.</p>
|
||
</section>
|
||
<section id="docker-swarm-stack">
|
||
<h2><a class="toc-backref" href="#id6" role="doc-backlink">Docker Swarm stack</a><a class="headerlink" href="#docker-swarm-stack" title="Link to this heading"></a></h2>
|
||
<p>The <a class="reference internal" href="../docker_stack_module.html#ansible-collections-community-docker-docker-stack-module"><span class="std std-ref">community.docker.docker_stack module</span></a> module allows you to control Docker Swarm stacks. Information on Swarm stacks can be retrieved by the <a class="reference internal" href="../docker_stack_info_module.html#ansible-collections-community-docker-docker-stack-info-module"><span class="std std-ref">community.docker.docker_stack_info module</span></a>, and information on Swarm stack tasks can be retrieved by the <a class="reference internal" href="../docker_stack_task_info_module.html#ansible-collections-community-docker-docker-stack-task-info-module"><span class="std std-ref">community.docker.docker_stack_task_info module</span></a>.</p>
|
||
</section>
|
||
<section id="docker-swarm">
|
||
<h2><a class="toc-backref" href="#id7" role="doc-backlink">Docker Swarm</a><a class="headerlink" href="#docker-swarm" title="Link to this heading"></a></h2>
|
||
<p>The community.docker collection provides multiple plugins and modules for managing Docker Swarms.</p>
|
||
<section id="swarm-management">
|
||
<h3>Swarm management<a class="headerlink" href="#swarm-management" title="Link to this heading"></a></h3>
|
||
<p>One inventory plugin and several modules are provided to manage Docker Swarms:</p>
|
||
<blockquote>
|
||
<div><dl class="simple">
|
||
<dt>docker_swarm inventory plugin</dt><dd><p>The <a class="reference internal" href="../docker_swarm_inventory.html#ansible-collections-community-docker-docker-swarm-inventory"><span class="std std-ref">community.docker.docker_swarm inventory plugin</span></a> allows you to dynamically add all Docker Swarm nodes to your Ansible inventory.</p>
|
||
</dd>
|
||
<dt>docker_swarm module</dt><dd><p>The <a class="reference internal" href="../docker_swarm_module.html#ansible-collections-community-docker-docker-swarm-module"><span class="std std-ref">community.docker.docker_swarm module</span></a> allows you to globally configure Docker Swarm manager nodes to join and leave swarms, and to change the Docker Swarm configuration.</p>
|
||
</dd>
|
||
<dt>docker_swarm_info module</dt><dd><p>The <a class="reference internal" href="../docker_swarm_info_module.html#ansible-collections-community-docker-docker-swarm-info-module"><span class="std std-ref">community.docker.docker_swarm_info module</span></a> allows you to retrieve information on Docker Swarm.</p>
|
||
</dd>
|
||
<dt>docker_node module</dt><dd><p>The <a class="reference internal" href="../docker_node_module.html#ansible-collections-community-docker-docker-node-module"><span class="std std-ref">community.docker.docker_node module</span></a> allows you to manage Docker Swarm nodes.</p>
|
||
</dd>
|
||
<dt>docker_node_info module</dt><dd><p>The <a class="reference internal" href="../docker_node_info_module.html#ansible-collections-community-docker-docker-node-info-module"><span class="std std-ref">community.docker.docker_node_info module</span></a> allows you to retrieve information on Docker Swarm nodes.</p>
|
||
</dd>
|
||
</dl>
|
||
</div></blockquote>
|
||
</section>
|
||
<section id="configuration-management">
|
||
<h3>Configuration management<a class="headerlink" href="#configuration-management" title="Link to this heading"></a></h3>
|
||
<p>The community.docker collection offers modules to manage Docker Swarm configurations and secrets:</p>
|
||
<blockquote>
|
||
<div><dl class="simple">
|
||
<dt>docker_config module</dt><dd><p>The <a class="reference internal" href="../docker_config_module.html#ansible-collections-community-docker-docker-config-module"><span class="std std-ref">community.docker.docker_config module</span></a> allows you to create and modify Docker Swarm configs.</p>
|
||
</dd>
|
||
<dt>docker_secret module</dt><dd><p>The <a class="reference internal" href="../docker_secret_module.html#ansible-collections-community-docker-docker-secret-module"><span class="std std-ref">community.docker.docker_secret module</span></a> allows you to create and modify Docker Swarm secrets.</p>
|
||
</dd>
|
||
</dl>
|
||
</div></blockquote>
|
||
</section>
|
||
<section id="swarm-services">
|
||
<h3>Swarm services<a class="headerlink" href="#swarm-services" title="Link to this heading"></a></h3>
|
||
<p>Docker Swarm services can be created and updated with the <a class="reference internal" href="../docker_swarm_service_module.html#ansible-collections-community-docker-docker-swarm-service-module"><span class="std std-ref">community.docker.docker_swarm_service module</span></a>, and information on them can be queried by the <a class="reference internal" href="../docker_swarm_service_info_module.html#ansible-collections-community-docker-docker-swarm-service-info-module"><span class="std std-ref">community.docker.docker_swarm_service_info module</span></a>.</p>
|
||
</section>
|
||
</section>
|
||
</section>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
|
||
|
||
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
|
||
<a href="../changelog.html" class="btn btn-neutral float-left" title="Community.Docker Release Notes" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
|
||
<a href="../current_container_facts_module.html" class="btn btn-neutral float-right" title="community.docker.current_container_facts module – Return facts about whether the module runs in a container" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
|
||
</div>
|
||
|
||
<hr/>
|
||
|
||
<div role="contentinfo">
|
||
<p>© Copyright Community.Docker 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> |