mirror of
https://github.com/ansible-collections/community.docker.git
synced 2025-12-16 20:08:41 +00:00
473 lines
39 KiB
HTML
473 lines
39 KiB
HTML
<!DOCTYPE html>
|
||
<html class="writer-html5" lang="en" >
|
||
<head>
|
||
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
|
||
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||
<title>community.docker.docker_machine inventory – Docker Machine inventory source — Community.Docker Collection documentation</title>
|
||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||
<link rel="stylesheet" href="_static/css/ansible.css" type="text/css" />
|
||
<link rel="stylesheet" href="_static/antsibull-minimal.css" type="text/css" />
|
||
<link rel="stylesheet" href="_static/css/rtd-ethical-ads.css" type="text/css" />
|
||
<link rel="shortcut icon" href="_static/images/Ansible-Mark-RGB_Black.png"/>
|
||
<!--[if lt IE 9]>
|
||
<script src="_static/js/html5shiv.min.js"></script>
|
||
<![endif]-->
|
||
|
||
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
|
||
<script src="_static/jquery.js"></script>
|
||
<script src="_static/underscore.js"></script>
|
||
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
|
||
<script src="_static/doctools.js"></script>
|
||
<script src="_static/sphinx_highlight.js"></script>
|
||
<script src="_static/js/theme.js"></script>
|
||
<link rel="search" title="Search" href="search.html" />
|
||
<link rel="next" title="community.docker.docker_swarm inventory – Ansible dynamic inventory plugin for Docker swarm nodes." href="docker_swarm_inventory.html" />
|
||
<link rel="prev" title="community.docker.docker_containers inventory – Ansible dynamic inventory plugin for Docker containers" href="docker_containers_inventory.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/ansiblefest" target="_blank">AnsibleFest</a></li>
|
||
<li><a href="https://www.ansible.com/tower" target="_blank">Products</a></li>
|
||
<li><a href="https://www.ansible.com/community" target="_blank">Community</a></li>
|
||
<li><a href="https://www.ansible.com/webinars-training" target="_blank">Webinars & Training</a></li>
|
||
<li><a href="https://www.ansible.com/blog" target="_blank">Blog</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="docsite/scenario_guide.html">Docker Guide</a></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 Docker container</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="docker_compose_module.html">community.docker.docker_compose module – Manage multi-container Docker applications with Docker Compose.</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_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_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_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_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 a docker stack</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 class="current">
|
||
<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 current"><a class="current reference internal" href="#">community.docker.docker_machine inventory – Docker Machine inventory source</a><ul>
|
||
<li class="toctree-l2"><a class="reference internal" href="#synopsis">Synopsis</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="#requirements">Requirements</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="#parameters">Parameters</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="#examples">Examples</a><ul>
|
||
<li class="toctree-l3"><a class="reference internal" href="#authors">Authors</a></li>
|
||
<li class="toctree-l3"><a class="reference internal" href="#collection-links">Collection links</a></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</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"></a></li>
|
||
<li class="breadcrumb-item active">community.docker.docker_machine inventory – Docker Machine inventory source</li>
|
||
<li class="wy-breadcrumbs-aside">
|
||
<!-- User defined GitHub URL -->
|
||
<a href="https://github.com/ansible-collections/community.docker/edit/main/plugins/inventory/docker_machine.py?description=%23%23%23%23%23%20SUMMARY%0A%3C!—%20Your%20description%20here%20–%3E%0A%0A%0A%23%23%23%23%23%20ISSUE%20TYPE%0A-%20Docs%20Pull%20Request%0A%0A%2Blabel:%20docsite_pr" class="fa fa-github"> Edit on GitHub</a>
|
||
</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-community-docker-docker-machine-inventory"></span><section id="community-docker-docker-machine-inventory-docker-machine-inventory-source">
|
||
<h1>community.docker.docker_machine inventory – Docker Machine inventory source<a class="headerlink" href="#community-docker-docker-machine-inventory-docker-machine-inventory-source" title="Permalink to this heading"></a></h1>
|
||
<div class="admonition note">
|
||
<p class="admonition-title">Note</p>
|
||
<p>This inventory plugin is part of the <a class="reference external" href="https://galaxy.ansible.com/community/docker">community.docker collection</a> (version 3.4.0).</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">community.docker</span></code>.
|
||
You need further requirements to be able to use this inventory plugin,
|
||
see <a class="reference internal" href="#ansible-collections-community-docker-docker-machine-inventory-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">community.docker.docker_machine</span></code>.</p>
|
||
</div>
|
||
<div class="contents local topic" 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>
|
||
</div>
|
||
<section id="synopsis">
|
||
<h2><a class="toc-backref" href="#id1">Synopsis</a><a class="headerlink" href="#synopsis" title="Permalink to this heading"></a></h2>
|
||
<ul class="simple">
|
||
<li><p>Get inventory hosts from Docker Machine.</p></li>
|
||
<li><p>Uses a YAML configuration file that ends with docker_machine.(yml|yaml).</p></li>
|
||
<li><p>The plugin sets standard host variables <code class="docutils literal notranslate"><span class="pre">ansible_host</span></code>, <code class="docutils literal notranslate"><span class="pre">ansible_port</span></code>, <code class="docutils literal notranslate"><span class="pre">ansible_user</span></code> and <code class="docutils literal notranslate"><span class="pre">ansible_ssh_private_key</span></code>.</p></li>
|
||
<li><p>The plugin stores the Docker Machine ‘env’ output variables in <em>dm_</em> prefixed host variables.</p></li>
|
||
</ul>
|
||
</section>
|
||
<section id="requirements">
|
||
<span id="ansible-collections-community-docker-docker-machine-inventory-requirements"></span><h2><a class="toc-backref" href="#id2">Requirements</a><a class="headerlink" href="#requirements" title="Permalink to this heading"></a></h2>
|
||
<p>The below requirements are needed on the local controller node that executes this inventory.</p>
|
||
<ul class="simple">
|
||
<li><p><a class="reference external" href="https://docs.docker.com/machine/">Docker Machine</a></p></li>
|
||
</ul>
|
||
</section>
|
||
<section id="parameters">
|
||
<h2><a class="toc-backref" href="#id3">Parameters</a><a class="headerlink" href="#parameters" title="Permalink to this heading"></a></h2>
|
||
<table class="colwidths-auto 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-compose"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-machine-inventory-parameter-compose"><strong>compose</strong></p>
|
||
<a class="ansibleOptionLink" href="#parameter-compose" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">dictionary</span></p>
|
||
</div></td>
|
||
<td><div class="ansible-option-cell"><p>Create vars from jinja2 expressions.</p>
|
||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">{}</span></code></p>
|
||
</div></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||
<div class="ansibleOptionAnchor" id="parameter-daemon_env"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-machine-inventory-parameter-daemon-env"><strong>daemon_env</strong></p>
|
||
<a class="ansibleOptionLink" href="#parameter-daemon_env" 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>Whether docker daemon connection environment variables should be fetched, and how to behave if they cannot be fetched.</p>
|
||
<p>With <code class="docutils literal notranslate"><span class="pre">require</span></code> and <code class="docutils literal notranslate"><span class="pre">require-silently</span></code>, fetch them and skip any host for which they cannot be fetched. A warning will be issued for any skipped host if the choice is <code class="docutils literal notranslate"><span class="pre">require</span></code>.</p>
|
||
<p>With <code class="docutils literal notranslate"><span class="pre">optional</span></code> and <code class="docutils literal notranslate"><span class="pre">optional-silently</span></code>, fetch them and not skip hosts for which they cannot be fetched. A warning will be issued for hosts where they cannot be fetched if the choice is <code class="docutils literal notranslate"><span class="pre">optional</span></code>.</p>
|
||
<p>With <code class="docutils literal notranslate"><span class="pre">skip</span></code>, do not attempt to fetch the docker daemon connection environment variables.</p>
|
||
<p>If fetched successfully, the variables will be prefixed with <em>dm_</em> and stored as host variables.</p>
|
||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||
<ul class="simple">
|
||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">"require"</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">"require-silently"</span></code></p></li>
|
||
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">"optional"</span></code></p></li>
|
||
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">"optional-silently"</span></code></p></li>
|
||
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">"skip"</span></code></p></li>
|
||
</ul>
|
||
</div></td>
|
||
</tr>
|
||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||
<div class="ansibleOptionAnchor" id="parameter-groups"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-machine-inventory-parameter-groups"><strong>groups</strong></p>
|
||
<a class="ansibleOptionLink" href="#parameter-groups" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">dictionary</span></p>
|
||
</div></td>
|
||
<td><div class="ansible-option-cell"><p>Add hosts to group based on Jinja2 conditionals.</p>
|
||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">{}</span></code></p>
|
||
</div></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||
<div class="ansibleOptionAnchor" id="parameter-keyed_groups"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-machine-inventory-parameter-keyed-groups"><strong>keyed_groups</strong></p>
|
||
<a class="ansibleOptionLink" href="#parameter-keyed_groups" 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=dictionary</span></p>
|
||
</div></td>
|
||
<td><div class="ansible-option-cell"><p>Add hosts to group based on the values of a variable.</p>
|
||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">[]</span></code></p>
|
||
</div></td>
|
||
</tr>
|
||
<tr class="row-even"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
|
||
<div class="ansibleOptionAnchor" id="parameter-keyed_groups/default_value"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-machine-inventory-parameter-keyed-groups-default-value"><strong>default_value</strong></p>
|
||
<a class="ansibleOptionLink" href="#parameter-keyed_groups/default_value" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||
<p><span class="ansible-option-versionadded">added in ansible-core 2.12</span></p>
|
||
</div></td>
|
||
<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>The default value when the host variable’s value is an empty string.</p>
|
||
<p>This option is mutually exclusive with <code class="docutils literal notranslate"><span class="pre">trailing_separator</span></code>.</p>
|
||
</div></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
|
||
<div class="ansibleOptionAnchor" id="parameter-keyed_groups/key"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-machine-inventory-parameter-keyed-groups-key"><strong>key</strong></p>
|
||
<a class="ansibleOptionLink" href="#parameter-keyed_groups/key" 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-indent-desc"></div><div class="ansible-option-cell"><p>The key from input dictionary used to generate groups</p>
|
||
</div></td>
|
||
</tr>
|
||
<tr class="row-even"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
|
||
<div class="ansibleOptionAnchor" id="parameter-keyed_groups/parent_group"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-machine-inventory-parameter-keyed-groups-parent-group"><strong>parent_group</strong></p>
|
||
<a class="ansibleOptionLink" href="#parameter-keyed_groups/parent_group" 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-indent-desc"></div><div class="ansible-option-cell"><p>parent group for keyed group</p>
|
||
</div></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
|
||
<div class="ansibleOptionAnchor" id="parameter-keyed_groups/prefix"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-machine-inventory-parameter-keyed-groups-prefix"><strong>prefix</strong></p>
|
||
<a class="ansibleOptionLink" href="#parameter-keyed_groups/prefix" 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-indent-desc"></div><div class="ansible-option-cell"><p>A keyed group name will start with this prefix</p>
|
||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">""</span></code></p>
|
||
</div></td>
|
||
</tr>
|
||
<tr class="row-even"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
|
||
<div class="ansibleOptionAnchor" id="parameter-keyed_groups/separator"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-machine-inventory-parameter-keyed-groups-separator"><strong>separator</strong></p>
|
||
<a class="ansibleOptionLink" href="#parameter-keyed_groups/separator" 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-indent-desc"></div><div class="ansible-option-cell"><p>separator used to build the keyed group name</p>
|
||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">"_"</span></code></p>
|
||
</div></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
|
||
<div class="ansibleOptionAnchor" id="parameter-keyed_groups/trailing_separator"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-machine-inventory-parameter-keyed-groups-trailing-separator"><strong>trailing_separator</strong></p>
|
||
<a class="ansibleOptionLink" href="#parameter-keyed_groups/trailing_separator" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||
<p><span class="ansible-option-versionadded">added in ansible-core 2.12</span></p>
|
||
</div></td>
|
||
<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>Set this option to <em>False</em> to omit the <code class="docutils literal notranslate"><span class="pre">separator</span></code> after the host variable when the value is an empty string.</p>
|
||
<p>This option is mutually exclusive with <code class="docutils literal notranslate"><span class="pre">default_value</span></code>.</p>
|
||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></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-default-bold docutils literal notranslate"><span class="pre">true</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||
</ul>
|
||
</div></td>
|
||
</tr>
|
||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||
<div class="ansibleOptionAnchor" id="parameter-leading_separator"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-machine-inventory-parameter-leading-separator"><strong>leading_separator</strong></p>
|
||
<a class="ansibleOptionLink" href="#parameter-leading_separator" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||
<p><span class="ansible-option-versionadded">added in ansible-core 2.11</span></p>
|
||
</div></td>
|
||
<td><div class="ansible-option-cell"><p>Use in conjunction with keyed_groups.</p>
|
||
<p>By default, a keyed group that does not have a prefix or a separator provided will have a name that starts with an underscore.</p>
|
||
<p>This is because the default prefix is “” and the default separator is “_”.</p>
|
||
<p>Set this option to False to omit the leading underscore (or other separator) if no prefix is given.</p>
|
||
<p>If the group name is derived from a mapping the separator is still used to concatenate the items.</p>
|
||
<p>To not use a separator in the group name at all, set the separator for the keyed group to an empty string instead.</p>
|
||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></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-default-bold docutils literal notranslate"><span class="pre">true</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||
</ul>
|
||
</div></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||
<div class="ansibleOptionAnchor" id="parameter-plugin"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-machine-inventory-parameter-plugin"><strong>plugin</strong></p>
|
||
<a class="ansibleOptionLink" href="#parameter-plugin" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span> / <span class="ansible-option-required">required</span></p>
|
||
</div></td>
|
||
<td><div class="ansible-option-cell"><p>token that ensures this is a source file for the <code class="docutils literal notranslate"><span class="pre">docker_machine</span></code> plugin.</p>
|
||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||
<ul class="simple">
|
||
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">"docker_machine"</span></code></p></li>
|
||
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">"community.docker.docker_machine"</span></code></p></li>
|
||
</ul>
|
||
</div></td>
|
||
</tr>
|
||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||
<div class="ansibleOptionAnchor" id="parameter-running_required"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-machine-inventory-parameter-running-required"><strong>running_required</strong></p>
|
||
<a class="ansibleOptionLink" href="#parameter-running_required" 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>When <code class="docutils literal notranslate"><span class="pre">true</span></code>, hosts which Docker Machine indicates are in a state other than <code class="docutils literal notranslate"><span class="pre">running</span></code> will be skipped.</p>
|
||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></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-default-bold docutils literal notranslate"><span class="pre">true</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||
</ul>
|
||
</div></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||
<div class="ansibleOptionAnchor" id="parameter-strict"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-machine-inventory-parameter-strict"><strong>strict</strong></p>
|
||
<a class="ansibleOptionLink" href="#parameter-strict" 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>If <code class="docutils literal notranslate"><span class="pre">yes</span></code> make invalid entries a fatal error, otherwise skip and continue.</p>
|
||
<p>Since it is possible to use facts in the expressions they might not always be available and we ignore those errors by default.</p>
|
||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||
<ul class="simple">
|
||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></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-even"><td><div class="ansible-option-cell">
|
||
<div class="ansibleOptionAnchor" id="parameter-use_extra_vars"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-machine-inventory-parameter-use-extra-vars"><strong>use_extra_vars</strong></p>
|
||
<a class="ansibleOptionLink" href="#parameter-use_extra_vars" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||
<p><span class="ansible-option-versionadded">added in ansible-core 2.11</span></p>
|
||
</div></td>
|
||
<td><div class="ansible-option-cell"><p>Merge extra vars into the available variables for composition (highest precedence).</p>
|
||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||
<ul class="simple">
|
||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">true</span></code></p></li>
|
||
</ul>
|
||
<p class="ansible-option-line"><span class="ansible-option-configuration">Configuration:</span></p>
|
||
<ul>
|
||
<li><p>INI entry:</p>
|
||
<div class="highlight-YAML+Jinja notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">[</span><span class="nv">inventory_plugins</span><span class="p p-Indicator">]</span>
|
||
<span class="l l-Scalar l-Scalar-Plain">use_extra_vars = false</span>
|
||
</pre></div>
|
||
</div>
|
||
</li>
|
||
<li><p>Environment variable: <span class="target" id="index-0"></span><a class="reference internal" href="environment_variables.html#envvar-ANSIBLE_INVENTORY_USE_EXTRA_VARS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">ANSIBLE_INVENTORY_USE_EXTRA_VARS</span></code></a></p></li>
|
||
</ul>
|
||
</div></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||
<div class="ansibleOptionAnchor" id="parameter-verbose_output"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-machine-inventory-parameter-verbose-output"><strong>verbose_output</strong></p>
|
||
<a class="ansibleOptionLink" href="#parameter-verbose_output" 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>When <code class="docutils literal notranslate"><span class="pre">true</span></code>, include all available nodes metadata (for exmaple <code class="docutils literal notranslate"><span class="pre">Image</span></code>, <code class="docutils literal notranslate"><span class="pre">Region</span></code>, <code class="docutils literal notranslate"><span class="pre">Size</span></code>) as a JSON object named <code class="docutils literal notranslate"><span class="pre">docker_machine_node_attributes</span></code>.</p>
|
||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></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-default-bold docutils literal notranslate"><span class="pre">true</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||
</ul>
|
||
</div></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</section>
|
||
<section id="examples">
|
||
<h2><a class="toc-backref" href="#id4">Examples</a><a class="headerlink" href="#examples" title="Permalink to this heading"></a></h2>
|
||
<div class="highlight-yaml+jinja notranslate"><div class="highlight"><pre><span></span><span class="c1"># Minimal example</span>
|
||
<span class="nt">plugin</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">community.docker.docker_machine</span>
|
||
|
||
<span class="c1"># Example using constructed features to create a group per Docker Machine driver</span>
|
||
<span class="c1"># (https://docs.docker.com/machine/drivers/), for example:</span>
|
||
<span class="c1"># $ docker-machine create --driver digitalocean ... mymachine</span>
|
||
<span class="c1"># $ ansible-inventory -i ./path/to/docker-machine.yml --host=mymachine</span>
|
||
<span class="c1"># {</span>
|
||
<span class="c1"># ...</span>
|
||
<span class="c1"># "digitalocean": {</span>
|
||
<span class="c1"># "hosts": [</span>
|
||
<span class="c1"># "mymachine"</span>
|
||
<span class="c1"># ]</span>
|
||
<span class="c1"># ...</span>
|
||
<span class="c1"># }</span>
|
||
<span class="nt">strict</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">false</span>
|
||
<span class="nt">keyed_groups</span><span class="p">:</span>
|
||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">separator</span><span class="p">:</span><span class="w"> </span><span class="s">''</span>
|
||
<span class="w"> </span><span class="nt">key</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">docker_machine_node_attributes.DriverName</span>
|
||
|
||
<span class="c1"># Example grouping hosts by Digital Machine tag</span>
|
||
<span class="nt">strict</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">false</span>
|
||
<span class="nt">keyed_groups</span><span class="p">:</span>
|
||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">prefix</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">tag</span>
|
||
<span class="w"> </span><span class="nt">key</span><span class="p">:</span><span class="w"> </span><span class="s">'dm_tags'</span>
|
||
|
||
<span class="c1"># Example using compose to override the default SSH behaviour of asking the user to accept the remote host key</span>
|
||
<span class="nt">compose</span><span class="p">:</span>
|
||
<span class="w"> </span><span class="nt">ansible_ssh_common_args</span><span class="p">:</span><span class="w"> </span><span class="s">'"-o</span><span class="nv"> </span><span class="s">StrictHostKeyChecking=accept-new"'</span>
|
||
</pre></div>
|
||
</div>
|
||
<section id="authors">
|
||
<h3>Authors<a class="headerlink" href="#authors" title="Permalink to this heading"></a></h3>
|
||
<ul class="simple">
|
||
<li><p>Ximon Eighteen (@ximon18)</p></li>
|
||
</ul>
|
||
<div class="admonition hint">
|
||
<p class="admonition-title">Hint</p>
|
||
<p>Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.</p>
|
||
</div>
|
||
</section>
|
||
<section id="collection-links">
|
||
<h3>Collection links<a class="headerlink" href="#collection-links" title="Permalink to this heading"></a></h3>
|
||
<p class="ansible-links">
|
||
<a href="https://github.com/ansible-collections/community.docker/issues" aria-role="button" target="_blank" rel="noopener external">Issue Tracker</a>
|
||
<a href="https://github.com/ansible-collections/community.docker" aria-role="button" target="_blank" rel="noopener external">Repository (Sources)</a>
|
||
<a href="https://github.com/ansible-collections/community.docker/issues/new?assignees=&labels=&template=bug_report.md" aria-role="button" target="_blank" rel="noopener external">Submit a bug report</a>
|
||
<a href="https://github.com/ansible-collections/community.docker/issues/new?assignees=&labels=&template=feature_request.md" aria-role="button" target="_blank" rel="noopener external">Request a feature</a>
|
||
<a href="./#communication-for-community-docker" aria-role="button" target="_blank">Communication</a>
|
||
</p></section>
|
||
</section>
|
||
</section>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
|
||
|
||
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
|
||
<a href="docker_containers_inventory.html" class="btn btn-neutral float-left" title="community.docker.docker_containers inventory – Ansible dynamic inventory plugin for Docker containers" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
|
||
<a href="docker_swarm_inventory.html" class="btn btn-neutral float-right" title="community.docker.docker_swarm inventory – Ansible dynamic inventory plugin for Docker swarm nodes." 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> |