by "*" to match all values in that place,
+# or use "*" for the collection name to match all collections. In the URL, you can use
+# {namespace} and {name} for the two components of the collection name. If you want to use
+# "{" or "}" in the URL, write "{{" or "}}" instead. Basically these are Python format
+# strings (https://docs.python.org/3.8/library/string.html#formatstrings).
+collection_url = {
+ * = "https://galaxy.ansible.com/ui/repo/published/{namespace}/{name}/"
+}
+
+# The same wildcard rules and formatting rules as for collection_url apply.
+collection_install = {
+ * = "ansible-galaxy collection install {namespace}.{name}"
+}
diff --git a/dest/build.sh b/dest/build.sh
new file mode 100755
index 0000000..68e2b0a
--- /dev/null
+++ b/dest/build.sh
@@ -0,0 +1,29 @@
+#!/usr/bin/env bash
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+# Created with antsibull-docs 2.6.1
+
+set -e
+
+pushd "$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
+trap "{ popd; }" EXIT
+
+# Create collection documentation into temporary directory
+rm -rf temp-rst
+mkdir -p temp-rst
+chmod og-w temp-rst # antsibull-docs wants that directory only readable by itself
+antsibull-docs \
+ --config-file antsibull-docs.cfg \
+ collection \
+ --use-current \
+ --dest-dir temp-rst \
+ ericsysmin.docker
+
+# Copy collection documentation into source directory
+rsync -cprv --delete-after temp-rst/collections/ rst/collections/
+
+# Build Sphinx site
+sphinx-build -M html rst build -c . -W --keep-going
+
diff --git a/dest/conf.py b/dest/conf.py
new file mode 100644
index 0000000..21cfbb3
--- /dev/null
+++ b/dest/conf.py
@@ -0,0 +1,46 @@
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+# Created with antsibull-docs 2.6.1
+
+# This file only contains a selection of the most common options. For a full list see the
+# documentation:
+# http://www.sphinx-doc.org/en/master/config
+
+project = 'Ansible collections'
+copyright = 'Ansible contributors'
+
+title = 'Ansible Collections Documentation'
+html_short_title = 'Ansible Collections Documentation'
+
+extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'sphinx_antsibull_ext']
+
+pygments_style = 'ansible'
+
+highlight_language = 'YAML+Jinja'
+
+html_theme = 'sphinx_ansible_theme'
+html_show_sphinx = False
+
+display_version = False
+
+html_use_smartypants = True
+html_use_modindex = False
+html_use_index = False
+html_copy_source = False
+
+# See https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html#confval-intersphinx_mapping for the syntax
+intersphinx_mapping = {
+ 'python': ('https://docs.python.org/2/', (None, '../python2.inv')),
+ 'python3': ('https://docs.python.org/3/', (None, '../python3.inv')),
+ 'jinja2': ('http://jinja.palletsprojects.com/', (None, '../jinja2.inv')),
+ 'ansible_devel': ('https://docs.ansible.com/ansible/devel/', (None, '../ansible_devel.inv')),
+ # If you want references to resolve to a released Ansible version (say, `5`), uncomment and replace X by this version:
+ # 'ansibleX': ('https://docs.ansible.com/ansible/X/', (None, '../ansibleX.inv')),
+}
+
+default_role = 'any'
+
+nitpicky = True
+
diff --git a/dest/requirements.txt b/dest/requirements.txt
new file mode 100644
index 0000000..a369438
--- /dev/null
+++ b/dest/requirements.txt
@@ -0,0 +1,10 @@
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+# Created with antsibull-docs 2.6.1
+
+antsibull-docs >= 2.0.0, < 3.0.0
+ansible-pygments
+sphinx
+sphinx-ansible-theme >= 0.9.0
diff --git a/dest/rst/collections/environment_variables.rst b/dest/rst/collections/environment_variables.rst
new file mode 100644
index 0000000..e7b9060
--- /dev/null
+++ b/dest/rst/collections/environment_variables.rst
@@ -0,0 +1,15 @@
+
+:orphan:
+
+.. meta::
+ :antsibull-docs: 2.6.1
+
+.. _list_of_collection_env_vars:
+
+Index of all Collection Environment Variables
+=============================================
+
+The following index documents all environment variables declared by plugins in collections.
+Environment variables used by the ansible-core configuration are documented in :ref:`ansible_configuration_settings`.
+
+No environment variables have been defined.
diff --git a/dest/rst/collections/ericsysmin/docker/docker_role.rst b/dest/rst/collections/ericsysmin/docker/docker_role.rst
new file mode 100644
index 0000000..630255d
--- /dev/null
+++ b/dest/rst/collections/ericsysmin/docker/docker_role.rst
@@ -0,0 +1,2569 @@
+
+.. Document meta
+
+:orphan:
+
+.. |antsibull-internal-nbsp| unicode:: 0xA0
+ :trim:
+
+.. meta::
+ :antsibull-docs: 2.6.1
+
+.. Anchors
+
+.. _ansible_collections.ericsysmin.docker.docker_role:
+
+.. Title
+
+ericsysmin.docker.docker role -- Ansible role to install and configure Docker
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+.. Collection note
+
+.. note::
+ This role is part of the `ericsysmin.docker collection `_ (version 1.0.0).
+
+ It is not included in ``ansible-core``.
+ To check whether it is installed, run :code:`ansible-galaxy collection list`.
+
+ To install it use: :code:`ansible-galaxy collection install ericsysmin.docker`.
+
+ To use it in a playbook, specify: :code:`ericsysmin.docker.docker`.
+
+.. contents::
+ :local:
+ :depth: 2
+
+
+.. Entry point title
+
+Entry point ``main`` -- Ansible role to install and configure Docker
+--------------------------------------------------------------------
+
+.. version_added
+
+
+.. Deprecated
+
+
+Synopsis
+^^^^^^^^
+
+.. Description
+
+- Installation of Docker following Docker-Engine install procedures as documented by Docker.
+- It will manage kernel versions as well, verifying the that the correct kernel for Docker support is installed.
+
+.. Requirements
+
+
+.. Options
+
+Parameters
+^^^^^^^^^^
+
+.. tabularcolumns:: \X{1}{3}\X{2}{3}
+
+.. list-table::
+ :width: 100%
+ :widths: auto
+ :header-rows: 1
+ :class: longtable ansible-option-table
+
+ * - Parameter
+ - Comments
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_api_cors_header:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_api_cors_header**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ Set CORS headers in the remote API
+
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_authorization_plugins:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_authorization_plugins**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ Authorization plugins to load
+
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_bip:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_bip**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ Specify network bridge IP
+
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_block_device:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_block_device**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ The device name used for the storage driver.
+
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_bridge:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_bridge**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ Attach containers to a network bridge
+
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_cgroup_parent:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_cgroup_parent**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ Set parent cgroup for all containers
+
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_channel:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_channel**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ What release channel of Docker to install.
+
+
+ .. rst-class:: ansible-option-line
+
+ :ansible-option-default-bold:`Default:` :ansible-option-default:`"stable"`
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_cluster_advertise:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_cluster_advertise**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ Address or interface name to advertise
+
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_cluster_store:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_cluster_store**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ Set cluster store options
+
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_cluster_store_opts:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_cluster_store_opts**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ Please see dockerd manual for info
+
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_debug:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_debug**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ Enable debug mode
+
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_default_gateway:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_default_gateway**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ Container default gateway IPv4 address
+
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_default_gateway_v6:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_default_gateway_v6**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ Container default gateway IPv6 address
+
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_default_runtime:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_default_runtime**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ Default OCI runtime for containers
+
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_default_ulimits:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_default_ulimits**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ Default ulimits for containers
+
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_disable_legacy_registry:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_disable_legacy_registry**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ Disable contacting legacy registries
+
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_dns:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_dns**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ DNS server to use
+
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_dns_opts:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_dns_opts**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ DNS options to use
+
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_dns_search:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_dns_search**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ DNS search domains to use
+
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_edition:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_edition**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ Specifies either ce, or ee version of Docker.
+
+
+ .. rst-class:: ansible-option-line
+
+ :ansible-option-default-bold:`Default:` :ansible-option-default:`"ce"`
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_ee_url:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_ee_url**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ Docker EE URL from the Docker Store
+
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_ee_version:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_ee_version**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ Docker EE version for EE repository
+
+
+ .. rst-class:: ansible-option-line
+
+ :ansible-option-default-bold:`Default:` :ansible-option-default:`17.03`
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_exec_opts:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_exec_opts**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ Runtime execution options
+
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_exec_root:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_exec_root**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ Root directory for execution state files
+
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_fixed_cidr:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_fixed_cidr**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ IPv4 subnet for fixed IPs
+
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_fixed_cidr_v6:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_fixed_cidr_v6**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ IPv6 subnet for fixed IPs
+
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_graph:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_graph**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ Root of the Docker runtime
+
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_group:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_group**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ Group for the unix socket
+
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_hosts:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_hosts**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ Daemon socket(s) to connect to
+
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_http_proxy:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_http_proxy**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ Set the Docker service to use HTTP\_PROXY
+
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_https_proxy:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_https_proxy**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ Set the Docker service to use HTTPS\_PROXY
+
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_icc:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_icc**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ Enable inter-container communication
+
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_insecure_registries:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_insecure_registries**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ Enable insecure registry communication
+
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_ip:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_ip**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ Default IP when binding container ports
+
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_ip_forward:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_ip_forward**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ Enable net.ipv4.ip\_forward
+
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_ip_masq:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_ip_masq**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ Enable IP masquerading
+
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_iptables:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_iptables**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ Enable addition of iptables rules
+
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_ipv6:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_ipv6**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ Enable IPv6 networking
+
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_labels:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_labels**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ Set key=value labels to the daemon
+
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_live_restore:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_live_restore**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ Enables keeping containers alive during daemon downtime
+
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_log_driver:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_log_driver**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ Default driver for container logs
+
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_log_level:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_log_level**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ Set the logging level
+
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_log_opts:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_log_opts**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ Default log driver options for containers
+
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_max_concurrent_downloads:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_max_concurrent_downloads**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ Set the max concurrent downloads for each pull
+
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_max_concurrent_uploads:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_max_concurrent_uploads**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ Set the max concurrent uploads for each push
+
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_mount_opts:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_mount_opts**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ The mount options when mounting filesystems
+
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_mtu:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_mtu**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ Set the containers network MTU
+
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_no_proxy_params:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_no_proxy_params**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ Do not proxy for Docker service params
+
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_oom_score_adjust:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_oom_score_adjust**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ Set the oom\_score\_adj for the daemon
+
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_pidfile:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_pidfile**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ Path to use for daemon PID file
+
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_raw_logs:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_raw_logs**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ Full timestamps without ANSI coloring
+
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_registry_mirrors:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_registry_mirrors**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ Preferred Docker registry mirror
+
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_repo:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_repo**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ Defines how Ansible manages the repository
+
+ Options are \ :literal:`other`\ and \ :literal:`docker`\
+
+
+ .. rst-class:: ansible-option-line
+
+ :ansible-option-default-bold:`Default:` :ansible-option-default:`"docker"`
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_runtimes:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_runtimes**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ Register an additional OCI compatible runtime
+
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_selinux_enabled:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_selinux_enabled**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ Enable selinux support
+
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_storage_driver:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_storage_driver**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ Storage driver to use
+
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_storage_opts:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_storage_opts**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ Storage driver options
+
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_swarm_default_advertise_addr:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_swarm_default_advertise_addr**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ Set default address or interface for swarm advertised address
+
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_tls:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_tls**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ Use TLS; implied by –tlsverify
+
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_tlscacert:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_tlscacert**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ Trust certs signed only by this CA
+
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_tlscert:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_tlscert**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ Path to TLS certificate file
+
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_tlskey:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_tlskey**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ Path to TLS key file
+
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_tlsverify:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_tlsverify**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ Use TLS and verify the remote
+
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_userland_proxy:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_userland_proxy**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ Use userland proxy for loopback traffic
+
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_userns_remap:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_userns_remap**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ User/Group setting for user namespaces
+
+
+ .. raw:: html
+
+
+
+ * - .. raw:: html
+
+
+
+
+ .. _ansible_collections.ericsysmin.docker.docker_role__parameter-main__docker_users:
+
+ .. rst-class:: ansible-option-title
+
+ **docker_users**
+
+ .. raw:: html
+
+
+
+ .. ansible-option-type-line::
+
+ :ansible-option-type:`string`
+
+
+
+
+ .. raw:: html
+
+
+
+ - .. raw:: html
+
+
+
+ A list of system users to be added to the docker group (so they can use Docker on the server)
+
+
+ .. raw:: html
+
+
+
+
+.. Attributes
+
+
+.. Notes
+
+
+.. Seealso
+
+
+Authors
+^^^^^^^
+
+- Eric Anderson
+
+
+
+.. Extra links
+
+Collection links
+~~~~~~~~~~~~~~~~
+
+.. ansible-links::
+
+ - title: "Issue Tracker"
+ url: "https://github.com/ericsysmin/ansible-collection-docker/issues"
+ external: true
+ - title: "Repository (Sources)"
+ url: "https://github.com/ericsysmin/ansible-collection-docker"
+ external: true
+
+
+.. Parsing errors
+
diff --git a/dest/rst/collections/ericsysmin/docker/index.rst b/dest/rst/collections/ericsysmin/docker/index.rst
new file mode 100644
index 0000000..10aee54
--- /dev/null
+++ b/dest/rst/collections/ericsysmin/docker/index.rst
@@ -0,0 +1,66 @@
+
+
+.. meta::
+ :antsibull-docs: 2.6.1
+
+
+.. _plugins_in_ericsysmin.docker:
+
+Ericsysmin.Docker
+=================
+
+Collection version 1.0.0
+
+.. contents::
+ :local:
+ :depth: 1
+
+Description
+-----------
+
+Docker collection
+
+**Author:**
+
+* Eric Anderson
+
+
+.. ansible-links::
+
+ - title: "Issue Tracker"
+ url: "https://github.com/ericsysmin/ansible-collection-docker/issues"
+ external: true
+ - title: "Repository (Sources)"
+ url: "https://github.com/ericsysmin/ansible-collection-docker"
+ external: true
+
+
+
+
+.. toctree::
+ :maxdepth: 1
+
+
+Plugin Index
+------------
+
+There are no plugins in the ericsysmin.docker collection with automatically generated documentation.
+
+
+Role Index
+----------
+
+These are the roles in the ericsysmin.docker collection:
+
+* :ansplugin:`docker role ` -- Ansible role to install and configure Docker
+
+.. toctree::
+ :maxdepth: 1
+ :hidden:
+
+ docker_role
+
+
+.. seealso::
+
+ List of :ref:`collections ` with docs hosted here.
diff --git a/dest/rst/collections/ericsysmin/index.rst b/dest/rst/collections/ericsysmin/index.rst
new file mode 100644
index 0000000..1280370
--- /dev/null
+++ b/dest/rst/collections/ericsysmin/index.rst
@@ -0,0 +1,19 @@
+
+
+.. meta::
+ :antsibull-docs: 2.6.1
+
+.. _list_of_collections_ericsysmin:
+
+Collections in the Ericsysmin Namespace
+=======================================
+
+These are the collections documented here in the **ericsysmin** namespace.
+
+* :ref:`ericsysmin.docker `
+
+.. toctree::
+ :maxdepth: 1
+ :hidden:
+
+ docker/index
diff --git a/dest/rst/collections/index.rst b/dest/rst/collections/index.rst
new file mode 100644
index 0000000..35ba198
--- /dev/null
+++ b/dest/rst/collections/index.rst
@@ -0,0 +1,20 @@
+
+:orphan:
+
+.. meta::
+ :antsibull-docs: 2.6.1
+
+.. _list_of_collections:
+
+Collection Index
+================
+
+These are the collections documented here.
+
+* :ref:`ericsysmin.docker `
+
+.. toctree::
+ :maxdepth: 1
+ :hidden:
+
+ ericsysmin/index
diff --git a/dest/rst/collections/index_role.rst b/dest/rst/collections/index_role.rst
new file mode 100644
index 0000000..1e3d294
--- /dev/null
+++ b/dest/rst/collections/index_role.rst
@@ -0,0 +1,16 @@
+
+:orphan:
+
+.. meta::
+ :antsibull-docs: 2.6.1
+
+.. _list_of_role_plugins:
+
+Index of all Roles
+==================
+
+ericsysmin.docker
+-----------------
+
+* :ansplugin:`ericsysmin.docker.docker#role` -- Ansible role to install and configure Docker
+
diff --git a/dest/rst/index.rst b/dest/rst/index.rst
new file mode 100644
index 0000000..a180d9a
--- /dev/null
+++ b/dest/rst/index.rst
@@ -0,0 +1,31 @@
+
+.. Created with antsibull-docs 2.6.1
+
+.. _docsite_root_index:
+
+Welcome to my Ansible collection documentation
+==============================================
+
+This docsite contains documentation of ericsysmin.docker.
+
+
+.. toctree::
+ :maxdepth: 2
+ :caption: Collections:
+
+ collections/index
+
+
+.. toctree::
+ :maxdepth: 1
+ :caption: Plugin indexes:
+ :glob:
+
+ collections/index_*
+
+
+.. toctree::
+ :maxdepth: 1
+ :caption: Reference indexes:
+
+ collections/environment_variables
diff --git a/docs/readme.md b/docs/readme.md
index 367b977..eb7c715 100644
--- a/docs/readme.md
+++ b/docs/readme.md
@@ -1,14 +1,17 @@
-## Installing Docker via Ansible
-### Default Docker Install
-```
+# Installing Docker via Ansible
+
+## Default Docker Install
+
+```yaml
---
- hosts: all
roles:
- role: avinetworks.docker
```
-### Install Docker w/devicemapper
-```
+## Install Docker w/devicemapper
+
+```yaml
---
- hosts: all
roles:
@@ -17,8 +20,9 @@
docker_block_device: /dev/sda3
```
-### Install Docker w/HTTP Proxy Support
-```
+## Install Docker w/HTTP Proxy Support
+
+```yaml
---
- hosts: all
roles:
@@ -27,8 +31,9 @@
docker_https_proxy: https://proxy.example.com:443/
```
-### Install Docker w/HTTP Proxy Support & without proxy on internal sites
-```
+## Install Docker w/HTTP Proxy Support & without proxy on internal sites
+
+```yaml
---
- hosts: all
roles:
@@ -38,8 +43,9 @@
docker_no_proxy_params: "localhost,127.0.0.0/8,docker-registry.example.com"
```
-### Install Docker and customize the storage directory of images and containers
-```
+## Install Docker and customize the storage directory of images and containers
+
+```yaml
---
- hosts: all
roles:
@@ -47,8 +53,9 @@
docker_graph: /home/docker
```
-### Install/Upgrade Docker. Avoid container downtime during the upgrade of a Docker
-```
+## Install/Upgrade Docker. Avoid container downtime during the upgrade of a Docker
+
+```yaml
---
- hosts: all
roles:
diff --git a/galaxy.yml b/galaxy.yml
index 33878d4..18207be 100644
--- a/galaxy.yml
+++ b/galaxy.yml
@@ -1,58 +1,21 @@
-### REQUIRED
-
-# The namespace of the collection. This can be a company/brand/organization or product namespace under which all
-# content lives. May only contain alphanumeric characters and underscores. Additionally namespaces cannot start with
-# underscores or numbers and cannot contain consecutive underscores
+---
namespace: ericsysmin
-
-# The name of the collection. Has the same character restrictions as 'namespace'
name: docker
-
-# The version of the collection. Must be compatible with semantic versioning
-version: 0.1.1
-
-# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
+version: "1.0.0"
readme: README.md
-
-# A list of the collection's content authors. Can be just the name or in the format 'Full Name (url)
-# @nicks:irc/im.site#channel'
authors:
-- Eric Anderson
-
-
-### OPTIONAL but strongly recommended
-
-# A short summary description of the collection
+ - Eric Anderson
description: Docker collection
-
-# Either a single license or a list of licenses for content inside of a collection. Ansible Galaxy currently only
-# accepts L(SPDX,https://spdx.org/licenses/) licenses. This key is mutually exclusive with 'license_file'
-# license:
-# - GPL-2.0-or-later
-
-# The path to the license file for the collection. This path is relative to the root of the collection. This key is
-# mutually exclusive with 'license'
-license_file: LICENSE
-
-# A list of tags you want to associate with the collection for indexing/searching. A tag name has the same character
-# requirements as 'namespace' and 'name'
+license:
+ - MIT
tags:
- docker
-
-# Collections that this collection requires to be installed for it to be usable. The key of the dict is the
-# collection label 'namespace.name'. The value is a version range
-# L(specifiers,https://python-semanticversion.readthedocs.io/en/latest/#requirement-specification). Multiple version
-# range specifiers can be set and are separated by ','
-#dependencies: {}
-
-# The URL of the originating SCM repository
+ - infrastructure
+dependencies: {
+ "community.general": "*",
+ "ansible.posix": "*"
+}
repository: https://github.com/ericsysmin/ansible-collection-docker
-
-# The URL to any online docs
-#documentation: http://docs.example.com
-
-# The URL to the homepage of the collection/project
homepage: https://github.com/ericsysmin/ansible-collection-docker
-
-# The URL to the collection issue tracker
issues: https://github.com/ericsysmin/ansible-collection-docker/issues
+documentation: https://ericsysmin.github.io/ansible-collection-docker/
diff --git a/meta/runtime.yml b/meta/runtime.yml
new file mode 100644
index 0000000..bb3fca1
--- /dev/null
+++ b/meta/runtime.yml
@@ -0,0 +1 @@
+requires_ansible: '>=2.14.0'
diff --git a/molecule/default/.ansible-lint b/molecule/default/.ansible-lint
deleted file mode 100644
index e74e096..0000000
--- a/molecule/default/.ansible-lint
+++ /dev/null
@@ -1,6 +0,0 @@
----
-parseable: true
-skip_list:
- - ANSIBLE0010
-use_default_rules: true
-verbosity: 1
diff --git a/molecule/default/.yamllint b/molecule/default/.yamllint
deleted file mode 100644
index a027086..0000000
--- a/molecule/default/.yamllint
+++ /dev/null
@@ -1,11 +0,0 @@
----
-extends: default
-
-rules:
- braces:
- max-spaces-inside: 1
- level: error
- brackets:
- max-spaces-inside: 1
- level: error
- line-length: disable
diff --git a/molecule/default/Dockerfile.j2 b/molecule/default/Dockerfile.j2
deleted file mode 100644
index 1478f38..0000000
--- a/molecule/default/Dockerfile.j2
+++ /dev/null
@@ -1,30 +0,0 @@
-# Molecule managed
-
-{% if item.registry is defined %}
-FROM {{ item.registry.url }}/{{ item.image }}
-{% else %}
-FROM {{ item.image }}
-{% endif %}
-
-RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python sudo bash ca-certificates && apt-get clean; \
- elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python sudo python-devel python2-dnf bash systemd && dnf clean all; \
- elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl bash && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \
- elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python sudo bash python-xml && zypper clean -a; \
- elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates; \
- elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python sudo bash ca-certificates && xbps-remove -O; fi
-
-
-{% if item.image.split(':', 1)[1] in ["bionic", "stretch"] %}
-RUN apt-get install -y systemd systemd-cron && apt-get clean
-{% endif %}
-
-{% if item.service_manager == "systemd" %}
-RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \
- rm -f /lib/systemd/system/multi-user.target.wants/*;\
- rm -f /etc/systemd/system/*.wants/*;\
- rm -f /lib/systemd/system/local-fs.target.wants/*; \
- rm -f /lib/systemd/system/sockets.target.wants/*udev*; \
- rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
- rm -f /lib/systemd/system/basic.target.wants/*;\
- rm -f /lib/systemd/system/anaconda.target.wants/*;
-{% endif %}
diff --git a/molecule/default/converge.yml b/molecule/default/converge.yml
deleted file mode 100644
index 12347eb..0000000
--- a/molecule/default/converge.yml
+++ /dev/null
@@ -1,20 +0,0 @@
----
-- name: Converge
- hosts: all
- pre_tasks:
- - name: upgrade python # noqa 403
- package:
- name: python
- state: latest
- - name: create containerd folder
- file:
- path: /etc/systemd/system/containerd.service.d
- state: directory
- when: ansible_service_mgr == "systemd"
- - name: override file for containerd
- copy:
- src: files/override.conf
- dest: /etc/systemd/system/containerd.service.d/override.conf
- when: ansible_service_mgr == "systemd"
- roles:
- - role: ericsysmin.docker.docker
diff --git a/molecule/default/files/override.conf b/molecule/default/files/override.conf
deleted file mode 100644
index 76864e2..0000000
--- a/molecule/default/files/override.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-[Service]
-ExecStartPre=
diff --git a/molecule/docker/Dockerfile.j2 b/molecule/docker/Dockerfile.j2
new file mode 100644
index 0000000..28c807f
--- /dev/null
+++ b/molecule/docker/Dockerfile.j2
@@ -0,0 +1 @@
+{{ lookup('url', 'https://raw.githubusercontent.com/ericsysmin/ansible-molecule-dockerfiles/main/' ~ item.image ~ '/Dockerfile', split_lines=False) }}
diff --git a/molecule/docker/converge.yml b/molecule/docker/converge.yml
new file mode 100644
index 0000000..6e36e06
--- /dev/null
+++ b/molecule/docker/converge.yml
@@ -0,0 +1,26 @@
+---
+- name: Converge
+ hosts: all
+ pre_tasks:
+ - name: Wait for systemd to complete initialization. # noqa command-instead-of-module
+ ansible.builtin.command: systemctl is-system-running
+ register: systemctl_status
+ until: >-
+ "running" in systemctl_status.stdout or "degraded" in
+ systemctl_status.stdout
+ retries: 30
+ delay: 5
+ when:
+ - ansible_service_mgr == "systemd"
+ - ansible_distribution == "Fedora"
+ changed_when: false
+ - name: Update package cache
+ ansible.builtin.package:
+ update_cache: true
+ changed_when: false
+ register: task_result
+ until: task_result is success
+ retries: 10
+ delay: 2
+ roles:
+ - role: ericsysmin.docker.docker
diff --git a/molecule/default/molecule.yml b/molecule/docker/molecule.yml
similarity index 66%
rename from molecule/default/molecule.yml
rename to molecule/docker/molecule.yml
index b891dc6..2780dfc 100644
--- a/molecule/default/molecule.yml
+++ b/molecule/docker/molecule.yml
@@ -9,12 +9,12 @@ lint: |
ansible-lint
platforms:
- name: instance
- image: ${MOLECULE_DISTRO:-ubuntu:xenial}
+ image: ${MOLECULE_DISTRO:-ubuntu-xenial}
privileged: true
- service_manager: ${MOLECULE_SERVICE_MANAGER:-systemd}
- volumes:
- - /sys/fs/cgroup:/sys/fs/cgroup:ro
command: ${MOLECULE_COMMAND:-""}
+ volumes:
+ - /sys/fs/cgroup:/sys/fs/cgroup:rw
+ cgroupns_mode: host
provisioner:
name: ansible
playbooks:
diff --git a/molecule/default/tests/test_default.py b/molecule/docker/tests/test_default.py
similarity index 100%
rename from molecule/default/tests/test_default.py
rename to molecule/docker/tests/test_default.py
diff --git a/molecule/default/verify.yml b/molecule/docker/verify.yml
similarity index 55%
rename from molecule/default/verify.yml
rename to molecule/docker/verify.yml
index a82dd6f..6e148b1 100644
--- a/molecule/default/verify.yml
+++ b/molecule/docker/verify.yml
@@ -4,6 +4,6 @@
- name: Verify
hosts: all
tasks:
- - name: Example assertion
- assert:
- that: true
+ - name: Example assertion
+ ansible.builtin.assert:
+ that: true
diff --git a/roles/docker/defaults/main.yml b/roles/docker/defaults/main.yml
index dd7a14b..e2aa1a2 100644
--- a/roles/docker/defaults/main.yml
+++ b/roles/docker/defaults/main.yml
@@ -1,4 +1,5 @@
---
+# code: language=ansible
# defaults file for docker
docker_service_enabled: true
docker_config: {}
diff --git a/roles/docker/handlers/main.yml b/roles/docker/handlers/main.yml
index 74d2198..c5e4240 100644
--- a/roles/docker/handlers/main.yml
+++ b/roles/docker/handlers/main.yml
@@ -1,6 +1,9 @@
---
- name: Docker | Daemon-reload
- systemd: daemon_reload=yes
+ ansible.builtin.systemd:
+ daemon_reload: "yes"
- name: Docker | Restart Docker
- service: name=docker state=restarted
+ ansible.builtin.service:
+ name: docker
+ state: restarted
diff --git a/roles/docker/meta/argument_specs.yml b/roles/docker/meta/argument_specs.yml
new file mode 100644
index 0000000..9514e14
--- /dev/null
+++ b/roles/docker/meta/argument_specs.yml
@@ -0,0 +1,149 @@
+---
+# code: language=ansible
+argument_specs:
+ main:
+ short_description: Ansible role to install and configure Docker
+ description:
+ - Installation of Docker following Docker-Engine install procedures as documented by Docker.
+ - It will manage kernel versions as well, verifying the that the correct kernel for Docker support is installed.
+ author:
+ - Eric Anderson
+ options:
+ docker_edition:
+ description: Specifies either ce, or ee edition of Docker.
+ default: ce
+ docker_ee_url:
+ description: Docker EE URL from the Docker Store
+ docker_repo:
+ description:
+ - Defines how Ansible manages the repository
+ - Options are C(other) and C(docker)
+ default: docker
+ docker_channel:
+ description: What release channel of Docker to install.
+ default: stable
+ docker_ee_version:
+ description: Docker EE version for EE repository
+ default: 17.03
+ docker_storage_driver:
+ description: Storage driver to use
+ docker_block_device:
+ description: The device name used for the storage driver.
+ docker_mount_opts:
+ description: The mount options when mounting filesystems
+ docker_storage_opts:
+ description: Storage driver options
+ docker_api_cors_header:
+ description: Set CORS headers in the remote API
+ docker_authorization_plugins:
+ description: Authorization plugins to load
+ docker_bip:
+ description: Specify network bridge IP
+ docker_bridge:
+ description: Attach containers to a network bridge
+ docker_cgroup_parent:
+ description: Set parent cgroup for all containers
+ docker_cluster_store:
+ description: Set cluster store options
+ docker_cluster_store_opts:
+ description: Please see dockerd manual for info
+ docker_cluster_advertise:
+ description: Address or interface name to advertise
+ docker_debug:
+ description: Enable debug mode
+ docker_default_gateway:
+ description: Container default gateway IPv4 address
+ docker_default_gateway_v6:
+ description: Container default gateway IPv6 address
+ docker_default_runtime:
+ description: Default OCI runtime for containers
+ docker_default_ulimits:
+ description: Default ulimits for containers
+ docker_disable_legacy_registry:
+ description: Disable contacting legacy registries
+ docker_dns:
+ description: DNS server to use
+ docker_dns_opts:
+ description: DNS options to use
+ docker_dns_search:
+ description: DNS search domains to use
+ docker_exec_opts:
+ description: Runtime execution options
+ docker_exec_root:
+ description: Root directory for execution state files
+ docker_fixed_cidr:
+ description: IPv4 subnet for fixed IPs
+ docker_fixed_cidr_v6:
+ description: IPv6 subnet for fixed IPs
+ docker_graph:
+ description: Root of the Docker runtime
+ docker_group:
+ description: Group for the unix socket
+ docker_hosts:
+ description: Daemon socket(s) to connect to
+ docker_icc:
+ description: Enable inter-container communication
+ docker_insecure_registries:
+ description: Enable insecure registry communication
+ docker_ip:
+ description: Default IP when binding container ports
+ docker_iptables:
+ description: Enable addition of iptables rules
+ docker_ipv6:
+ description: Enable IPv6 networking
+ docker_ip_forward:
+ description: Enable net.ipv4.ip_forward
+ docker_ip_masq:
+ description: Enable IP masquerading
+ docker_labels:
+ description: Set key=value labels to the daemon
+ docker_live_restore:
+ description: Enables keeping containers alive during daemon downtime
+ docker_log_driver:
+ description: Default driver for container logs
+ docker_log_level:
+ description: Set the logging level
+ docker_log_opts:
+ description: Default log driver options for containers
+ docker_max_concurrent_downloads:
+ description: Set the max concurrent downloads for each pull
+ docker_max_concurrent_uploads:
+ description: Set the max concurrent uploads for each push
+ docker_mtu:
+ description: Set the containers network MTU
+ docker_oom_score_adjust:
+ description: Set the oom_score_adj for the daemon
+ docker_pidfile:
+ description: Path to use for daemon PID file
+ docker_raw_logs:
+ description: Full timestamps without ANSI coloring
+ docker_registry_mirrors:
+ description: Preferred Docker registry mirror
+ docker_runtimes:
+ description: Register an additional OCI compatible runtime
+ docker_selinux_enabled:
+ description: Enable selinux support
+ docker_swarm_default_advertise_addr:
+ description: Set default address or interface for swarm advertised address
+ docker_tls:
+ description: Use TLS; implied by –tlsverify
+ docker_tlscacert:
+ description: Trust certs signed only by this CA
+ docker_tlscert:
+ description: Path to TLS certificate file
+ docker_tlskey:
+ description: Path to TLS key file
+ docker_tlsverify:
+ description: Use TLS and verify the remote
+ docker_userland_proxy:
+ description: Use userland proxy for loopback traffic
+ docker_userns_remap:
+ description: User/Group setting for user namespaces
+ docker_users:
+ description: A list of system users to be added to the docker group (so they can use Docker on the server)
+ docker_http_proxy:
+ description: Set the Docker service to use HTTP_PROXY
+ docker_https_proxy:
+ description: Set the Docker service to use HTTPS_PROXY
+ docker_no_proxy_params:
+ description: Do not proxy for Docker service params
diff --git a/roles/docker/meta/main.yml b/roles/docker/meta/main.yml
index 3ba54fc..a7bccaf 100644
--- a/roles/docker/meta/main.yml
+++ b/roles/docker/meta/main.yml
@@ -1,32 +1,12 @@
---
+# code: language=ansible
galaxy_info:
role_name: docker
author: ericsymsin
- description: Ansible role that installs Docker
- company: Avi Networks
+ description: Ansible role that installs and configures Docker
issue_tracker_url: https://github.com/ericsysmin/ansible-collection-docker/issues
- license: Apache-2.0
- min_ansible_version: 2.4.0
- github_branch: master
- platforms:
- - name: EL
- versions:
- - 7
- - 8
- - name: Fedora
- versions:
- - 27
- - 28
- - name: Ubuntu
- versions:
- - trusty
- - xenial
- - bionic
- - name: Debian
- versions:
- - jessie
- - stretch
- - wheezy
+ license: MIT
+ min_ansible_version: "2.9.0"
galaxy_tags:
- docker
- ubuntu
diff --git a/roles/docker/tasks/ce/apt.yml b/roles/docker/tasks/ce/apt.yml
index 09bc2cd..09aa5c0 100644
--- a/roles/docker/tasks/ce/apt.yml
+++ b/roles/docker/tasks/ce/apt.yml
@@ -1,18 +1,7 @@
---
-- name: Docker | CE | APT | Remove old repo lxc-docker
- apt:
- name:
- - docker
- - docker-engine
- - docker-io
- state: absent
- register: task_result
- until: task_result is success
- retries: 10
- delay: 2
-
+# code: language=ansible
- name: Docker | CE | APT | Install Prerequisits for APT
- apt:
+ ansible.builtin.apt:
name:
- apt-transport-https
- ca-certificates
@@ -28,33 +17,40 @@
- name: Docker | CE | APT | Add repository key
block:
- name: Docker | CE | APT | Add Docker GPG Key
- apt_key:
+ ansible.builtin.apt_key:
id: "{{ docker_ce_gpg_key_id }}"
url: "{{ docker_ce_gpg_key }}"
validate_certs: "{{ docker_ce_gpg_key_validate_certs }}"
rescue:
- name: Docker | CE | APT | Ensure curl is present (systems without SNI).
- package: name=curl
- - name: Docker | CE | APT | Download GPG key (systems without SNI). # noqa 303
- shell: "curl -sSL {{ docker_ce_gpg_key }} | sudo apt-key add -"
-
+ ansible.builtin.package:
+ name: curl
+ - name: Docker | CE | APT | Download GPG key (systems without SNI). # noqa command-instead-of-module no-changed-when
+ ansible.builtin.command: curl -sSL {{ docker_ce_gpg_key }} | sudo apt-key add -
- name: Docker | CE | APT | Configure Docker repository
- apt_repository:
+ ansible.builtin.apt_repository:
repo: "{{ docker_apt_repo_url }}"
- name: Docker | CE | APT | Enable Edge repository
- apt_repository:
+ ansible.builtin.apt_repository:
repo: "{{ docker_apt_repo_url_edge }}"
when: docker_channel == "edge"
- name: Docker | CE | APT | Perform specific os tasks
- include_tasks: "{{ item }}"
+ ansible.builtin.include_tasks: "{{ item }}"
with_first_found:
- - os/{{ ansible_distribution.split(' ', 1)[0]|lower }}.yml
- - os/default.yml
+ - ce/os/{{ ansible_distribution.split(' ', 1)[0] | lower }}.yml
+ - ce/os/default.yml
- name: Docker | CE | APT | Install docker-ce
- apt: name=docker-ce state=present
+ ansible.builtin.apt:
+ name:
+ - docker-ce
+ - docker-ce-cli
+ - containerd.io
+ - docker-buildx-plugin
+ - docker-compose-plugin
+ state: present
notify: Docker | Restart Docker
register: task_result
until: task_result is success
diff --git a/roles/docker/tasks/ce/dnf.yml b/roles/docker/tasks/ce/dnf.yml
index d97c247..5dd5f0f 100644
--- a/roles/docker/tasks/ce/dnf.yml
+++ b/roles/docker/tasks/ce/dnf.yml
@@ -1,55 +1,54 @@
---
-# - name: Docker | CE | DNF | Remove older Docker installations
-# dnf: name={{ item }} state=absent
-# with_items:
-# - docker
-# - docker-common
-# - docker-engine
+# code: language=ansible
- name: Docker | CE | DNF | Add repository key
block:
- name: Docker | CE | DNF | Add repository key
- rpm_key:
+ ansible.builtin.rpm_key:
key: "{{ docker_ce_gpg_key }}"
rescue:
- name: Docker | CE | DNF | Ensure curl is present (systems without SNI).
- package: name=curl
+ ansible.builtin.package:
+ name: curl
register: task_result
until: task_result is success
retries: 10
delay: 2
- - name: Docker | CE | DNF | Download GPG key (systems without SNI). # noqa 303 305
- shell: "curl -sSL {{ docker_ce_gpg_key }} -o /tmp/docker-gpg"
- - name: Docker | CE | DNF | Add Docker GPG key (systems without SNI). # noqa 303 305
- shell: rpm --import /tmp/docker-gpg
+ - name: Docker | CE | DNF | Download GPG key (systems without SNI). # noqa command-instead-of-module no-changed-when
+ ansible.builtin.command: curl -sSL {{ docker_ce_gpg_key }} -o /tmp/docker-gpg
+ - name: Docker | CE | DNF | Add Docker GPG key (systems without SNI). # noqa command-instead-of-module no-changed-when
+ ansible.builtin.command: rpm --import /tmp/docker-gpg
- name: Docker | CE | DNF | Remove docker-gpg from tmp folder
- file: path=/tmp/docker-gpg state=absent
+ ansible.builtin.file:
+ path: /tmp/docker-gpg
+ state: absent
- name: Docker | CE | DNF | Deploy repository
block:
- name: Docker | CE | DNF | Deploy repository
- get_url:
+ ansible.builtin.get_url:
url: "{{ docker_ce_repo_file_url }}"
dest: /etc/yum.repos.d/docker-ce.repo
owner: root
group: root
- mode: 0644
+ mode: "0644"
rescue:
- name: Docker | CE | DNF | Install dnf-utils (systems without SNI)
- dnf: name=dnf-plugins-core
+ ansible.builtin.dnf:
+ name: dnf-plugins-core
register: task_result
until: task_result is success
retries: 10
delay: 2
- - name: Docker | CE | DNF | Deploy repository (systems without SNI) # noqa 305
- shell: "dnf config-manager --add-repo {{ docker_ce_repo_file_url }}"
+ - name: Docker | CE | DNF | Deploy repository (systems without SNI) # noqa command-instead-of-module
+ ansible.builtin.command: dnf config-manager --add-repo {{ docker_ce_repo_file_url }}
args:
creates: /etc/yum.repos.d/docker-ce.repo
- name: Docker | CE | DNF | Enable edge repository
- yum_repository:
+ ansible.builtin.yum_repository:
name: docker-ce-edge
- description: "Docker CE Edge - $basearch"
+ description: Docker CE Edge - $basearch
baseurl: "{{ docker_ce_edge_repo_url }}"
gpgcheck: true
gpgkey: "{{ docker_ce_gpg_key }}"
@@ -58,13 +57,13 @@
when: docker_channel == "edge"
- name: Docker | CE | DNF | Perform specific os tasks
- include_tasks: "{{ item }}"
+ ansible.builtin.include_tasks: "{{ item }}"
with_first_found:
- - os/{{ ansible_distribution.split(' ', 1)[0]|lower }}.yml
- - os/default.yml
+ - ce/os/{{ ansible_distribution.split(' ', 1)[0] | lower }}.yml
+ - ce/os/default.yml
- name: Docker | CE | DNF | Install docker-ce
- dnf:
+ ansible.builtin.dnf:
name: docker-ce
state: present
notify: Docker | Restart Docker
diff --git a/roles/docker/tasks/ce/os/debian.yml b/roles/docker/tasks/ce/os/debian.yml
index 68e0732..daecc4f 100644
--- a/roles/docker/tasks/ce/os/debian.yml
+++ b/roles/docker/tasks/ce/os/debian.yml
@@ -1,4 +1,5 @@
---
+# code: language=ansible
- name: Docker | CE | Debian | Install the Debian Backports repository
- apt_repository:
- repo: "deb http://ftp.debian.org/debian {{ ansible_distribution_release }}-backports main"
+ ansible.builtin.apt_repository:
+ repo: deb http://ftp.debian.org/debian {{ ansible_distribution_release }}-backports main
diff --git a/roles/docker/tasks/ce/os/default.yml b/roles/docker/tasks/ce/os/default.yml
index ed97d53..c6e72ab 100644
--- a/roles/docker/tasks/ce/os/default.yml
+++ b/roles/docker/tasks/ce/os/default.yml
@@ -1 +1,2 @@
---
+# code: language=ansible
diff --git a/roles/docker/tasks/ce/os/ubuntu.yml b/roles/docker/tasks/ce/os/ubuntu.yml
index 31c5fa1..14cefc0 100644
--- a/roles/docker/tasks/ce/os/ubuntu.yml
+++ b/roles/docker/tasks/ce/os/ubuntu.yml
@@ -1,8 +1,10 @@
---
+# code: language=ansible
# For Ubuntu Trusty, Wily, and Xenial, it’s recommended to install the linux-image-extra kernel package.
# The linux-image-extra package allows you use the aufs storage driver.
- name: Docker | CE | Ubuntu | Install the linux-image-extra kernal package
- apt: name="linux-image-extra-{{ ansible_kernel }}" state=present
+ ansible.builtin.apt:
+ name: "linux-image-extra-{{ ansible_kernel }}"
when: ansible_distribution_version in ['14.04','15.10']
register: task_result
until: task_result is success
@@ -11,7 +13,9 @@
# If you are installing on Ubuntu 14.04, apparmor is required.
- name: Docker | CE | Ubuntu | Install AppArmor Dependency
- apt: name=apparmor state=present
+ ansible.builtin.apt:
+ name: apparmor
+ state: present
when: ansible_distribution_version in "14.04"
register: task_result
until: task_result is success
diff --git a/roles/docker/tasks/ce/yum.yml b/roles/docker/tasks/ce/yum.yml
index c0abaea..b30fece 100644
--- a/roles/docker/tasks/ce/yum.yml
+++ b/roles/docker/tasks/ce/yum.yml
@@ -1,51 +1,49 @@
---
-# - name: Docker | CE | YUM | Remove older Docker installations
-# yum: name={{ item }} state=absent
-# with_items:
-# - docker
-# - docker-common
-# - docker-engine
+# code: language=ansible
- name: Docker | CE | YUM | Add repository key
block:
- name: Docker | CE | YUM | Add repository key
- rpm_key:
+ ansible.builtin.rpm_key:
key: "{{ docker_ce_gpg_key }}"
rescue:
- name: Docker | CE | YUM | Ensure curl is present (systems without SNI).
- package: name=curl
- - name: Docker | CE | YUM | Download GPG key (systems without SNI). # noqa 303 305
- shell: "curl -sSL {{ docker_ce_gpg_key }} -o /tmp/docker-gpg"
- - name: Docker | CE | YUM | Add Docker GPG key (systems without SNI). # noqa 303 305
- shell: rpm --import /tmp/docker-gpg
+ ansible.builtin.package:
+ name: curl
+ - name: Docker | CE | YUM | Download GPG key (systems without SNI). # noqa no-changed-when command-instead-of-module
+ ansible.builtin.command: curl -sSL {{ docker_ce_gpg_key }} -o /tmp/docker-gpg
+ - name: Docker | CE | YUM | Add Docker GPG key (systems without SNI). # noqa no-changed-when command-instead-of-module
+ ansible.builtin.command: rpm --import /tmp/docker-gpg
- name: Docker | CE | YUM | Remove docker-gpg from tmp folder
- file: path=/tmp/docker-gpg state=absent
-
+ ansible.builtin.file:
+ path: /tmp/docker-gpg
+ state: absent
- name: Docker | CE | YUM | Deploy repository
block:
- name: Docker | CE | YUM | Deploy repository
- get_url:
+ ansible.builtin.get_url:
url: "{{ docker_ce_repo_file_url }}"
dest: /etc/yum.repos.d/docker-ce.repo
owner: root
group: root
- mode: 0644
+ mode: "0644"
rescue:
- name: Docker | CE | YUM | Install yum-utils (systems without SNI)
- yum: name=yum-utils
+ ansible.builtin.yum:
+ name: yum-utils
register: task_result
until: task_result is success
retries: 10
delay: 2
- - name: Docker | CE | YUM | Deploy repository (systems without SNI) # noqa 305
- shell: "yum-config-manager --add-repo {{ docker_ce_repo_file_url }}"
+ - name: Docker | CE | YUM | Deploy repository (systems without SNI)
+ ansible.builtin.command: yum-config-manager --add-repo {{ docker_ce_repo_file_url }}
args:
creates: /etc/yum.repos.d/docker-ce.repo
- name: Docker | CE | YUM | Enable edge repository
- yum_repository:
+ ansible.builtin.yum_repository:
name: docker-ce-edge
- description: "Docker CE Edge - $basearch"
+ description: Docker CE Edge - $basearch
baseurl: "{{ docker_ce_edge_repo_url }}"
gpgcheck: true
gpgkey: "{{ docker_ce_gpg_key }}"
@@ -54,13 +52,13 @@
when: docker_channel == "edge"
- name: Docker | CE | YUM | Perform specific os tasks
- include_tasks: "{{ item }}"
+ ansible.builtin.include_tasks: "{{ item }}"
with_first_found:
- - os/{{ ansible_distribution.split(' ', 1)[0]|lower }}.yml
+ - os/{{ ansible_distribution.split(' ', 1)[0] | lower }}.yml
- os/default.yml
- name: Docker | CE | YUM | Install docker-ce
- yum:
+ ansible.builtin.yum:
name: docker-ce
state: present
notify: Docker | Restart Docker
diff --git a/roles/docker/tasks/deploy_config.yml b/roles/docker/tasks/deploy_config.yml
index 421fbc6..168bb2a 100644
--- a/roles/docker/tasks/deploy_config.yml
+++ b/roles/docker/tasks/deploy_config.yml
@@ -1,19 +1,21 @@
---
+# code: language=ansible
- name: Docker | Deploy Config | Make sure /etc/docker exists
- file: path=/etc/docker state=directory
+ ansible.builtin.file:
+ path: /etc/docker
+ state: directory
+ mode: "0755"
-# - name: Docker | Deploy Config | Deploy /etc/docker/daemon.json
-# template: src=docker_config.j2 dest=/etc/docker/daemon.json
-# notify: Docker | Restart Docker
-
-#### THESE ALLOW NOT USING TEMPLATE FILE ###
- name: Docker | Deploy Config | Set the Docker configuration
- set_fact:
- docker_config: "{{ docker_config|combine({ item.key: item.value }) }}"
+ ansible.builtin.set_fact:
+ docker_config: "{{ docker_config | combine({item.key: item.value}) }}"
when: item.value | string | length > 0
with_dict: "{{ docker_options }}"
- name: Docker | Deploy Config | Deploy /etc/docker/daemon.json
- copy: content="{{ docker_config | to_nice_json }}\n" dest=/etc/docker/daemon.json
+ ansible.builtin.copy:
+ content: "{{ docker_config | to_nice_json }}"
+ dest: /etc/docker/daemon.json
+ mode: "0644"
when: docker_config != {}
notify: Docker | Restart Docker
diff --git a/roles/docker/tasks/docker_users.yml b/roles/docker/tasks/docker_users.yml
index 45d082e..6675526 100644
--- a/roles/docker/tasks/docker_users.yml
+++ b/roles/docker/tasks/docker_users.yml
@@ -1,6 +1,7 @@
---
+# code: language=ansible
- name: Ensure docker users are added to the docker group.
- user:
+ ansible.builtin.user:
name: "{{ item }}"
groups: docker
append: true
diff --git a/roles/docker/tasks/ee/apt.yml b/roles/docker/tasks/ee/apt.yml
index 33682ae..db182d8 100644
--- a/roles/docker/tasks/ee/apt.yml
+++ b/roles/docker/tasks/ee/apt.yml
@@ -1,33 +1,38 @@
---
+# code: language=ansible
- name: Docker | EE | APT | Install Prerequisits for APT
- apt: name="{{ item }}" state=present
- with_items:
- - apt-transport-https
- - ca-certificates
- - curl
- - software-properties-common
+ ansible.builtin.apt:
+ name:
+ - apt-transport-https
+ - ca-certificates
+ - curl
+ - software-properties-common
+ state: present
register: task_result
until: task_result is success
retries: 10
delay: 2
- name: Docker | EE | APT | Perform specific os tasks
- include: os/{{ ansible_distribution|lower }}.yml
+ ansible.builtin.include_tasks: os/{{ ansible_distribution | lower }}.yml
- name: Docker | EE | APT | Remove old repo lxc-docker
- apt: name={{ item }} state=absent
- with_items:
- - lxc-docker
- - docker
- - docker-engine
- - docker-ce
+ ansible.builtin.apt:
+ name:
+ - lxc-docker
+ - docker
+ - docker-engine
+ - docker-ce
+ state: absent
register: task_result
until: task_result is success
retries: 10
delay: 2
- name: Docker | EE | APT | Install Docker Engine
- apt: name=docker-ee state=present
+ ansible.builtin.apt:
+ name: docker-ee
+ state: present
notify: Docker | Restart Docker
register: task_result
until: task_result is success
diff --git a/roles/docker/tasks/ee/os/centos.yml b/roles/docker/tasks/ee/os/centos.yml
index ed97d53..c6e72ab 100644
--- a/roles/docker/tasks/ee/os/centos.yml
+++ b/roles/docker/tasks/ee/os/centos.yml
@@ -1 +1,2 @@
---
+# code: language=ansible
diff --git a/roles/docker/tasks/ee/os/debian.yml b/roles/docker/tasks/ee/os/debian.yml
index ed97d53..c6e72ab 100644
--- a/roles/docker/tasks/ee/os/debian.yml
+++ b/roles/docker/tasks/ee/os/debian.yml
@@ -1 +1,2 @@
---
+# code: language=ansible
diff --git a/roles/docker/tasks/ee/os/fedora.yml b/roles/docker/tasks/ee/os/fedora.yml
index ed97d53..c6e72ab 100644
--- a/roles/docker/tasks/ee/os/fedora.yml
+++ b/roles/docker/tasks/ee/os/fedora.yml
@@ -1 +1,2 @@
---
+# code: language=ansible
diff --git a/roles/docker/tasks/ee/os/oraclelinux.yml b/roles/docker/tasks/ee/os/oraclelinux.yml
index 0be40b2..e3a5260 100644
--- a/roles/docker/tasks/ee/os/oraclelinux.yml
+++ b/roles/docker/tasks/ee/os/oraclelinux.yml
@@ -1,9 +1,10 @@
---
+# code: language=ansible
- name: Docker | EE | YUM | Oracle Linux | Disable UEK R3
- yum_repository:
+ ansible.builtin.yum_repository:
name: ol7_UEKR3
description: Latest Unbreakable Enterprise Kernel Release 3 for Oracle Linux $releasever ($basearch)
- baseurl: "http://yum.oracle.com/repo/OracleLinux/OL7/UEKR3/$basearch/"
+ baseurl: http://yum.oracle.com/repo/OracleLinux/OL7/UEKR3/$basearch/
enabled: 0
gpgcheck: 1
gpgkey: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
@@ -14,10 +15,10 @@
delay: 2
- name: Docker | EE | YUM | Oracle Linux | Enable UEK R4
- yum_repository:
+ ansible.builtin.yum_repository:
name: ol7_UEKR4
description: Latest Unbreakable Enterprise Kernel Release 4 for Oracle Linux $releasever ($basearch)
- baseurl: "http://yum.oracle.com/repo/OracleLinux/OL7/UEKR4/$basearch/"
+ baseurl: http://yum.oracle.com/repo/OracleLinux/OL7/UEKR4/$basearch/
enabled: 1
gpgcheck: 1
gpgkey: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
diff --git a/roles/docker/tasks/ee/os/redhat.yml b/roles/docker/tasks/ee/os/redhat.yml
index ed97d53..c6e72ab 100644
--- a/roles/docker/tasks/ee/os/redhat.yml
+++ b/roles/docker/tasks/ee/os/redhat.yml
@@ -1 +1,2 @@
---
+# code: language=ansible
diff --git a/roles/docker/tasks/ee/os/ubuntu.yml b/roles/docker/tasks/ee/os/ubuntu.yml
index ca66fc6..e541dbd 100644
--- a/roles/docker/tasks/ee/os/ubuntu.yml
+++ b/roles/docker/tasks/ee/os/ubuntu.yml
@@ -1,8 +1,11 @@
---
+# code: language=ansible
# For Ubuntu Trusty, Wily, and Xenial, it’s recommended to install the linux-image-extra kernel package.
# The linux-image-extra package allows you use the aufs storage driver.
- name: Docker | EE | Ubuntu | Install the linux-image-extra kernal package
- apt: name="linux-image-extra-{{ ansible_kernel }}" state=present
+ ansible.builtin.apt:
+ name: "linux-image-extra-{{ ansible_kernel }}"
+ state: present
when: ansible_distribution_version in ['14.04','15.10']
register: task_result
until: task_result is success
@@ -11,7 +14,9 @@
# If you are installing on Ubuntu 14.04 or 12.04, apparmor is required.
- name: Docker | EE | Ubuntu | Install AppArmor Dependency
- apt: name=apparmor state=present
+ ansible.builtin.apt:
+ name: apparmor
+ state: present
when: ansible_distribution_version in "14.04"
register: task_result
until: task_result is success
@@ -19,21 +24,21 @@
delay: 2
# Check and see if the GPG key already exists on the host
-- name: Docker | CE | APT | Check GPG Key # noqa 305
- shell: gpg -k {{ docker_apt_key_id }}
+- name: Docker | CE | APT | Check GPG Key
+ ansible.builtin.command: gpg -k {{ docker_apt_key_id }}
failed_when: false
changed_when: false
register: docker_gpg_exists
# If the GPG key doesn't exist, then add the new GPG key
-- name: Docker | CE | APT | Add Docker GPG Key # noqa 303 306
- shell: curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
+- name: Docker | CE | APT | Add Docker GPG Key # noqa command-instead-of-module
+ ansible.builtin.command: curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
failed_when: false
changed_when: false
when: docker_gpg_exists.rc != 0
# Docker’s APT repository contains Docker 1.7.1 and higher.
- name: Docker | EE | APT | Configure Docker repository
- apt_repository:
- repo: "deb [arch=amd64] {{ docker_ee_url }} {{ ansible_distribution_release }} stable-{{ docker_ee_version }}"
+ ansible.builtin.apt_repository:
+ repo: deb [arch={{ docker_architecture }}] {{ docker_ee_url }} {{ ansible_distribution_release }} stable-{{ docker_ee_version }}
state: present
diff --git a/roles/docker/tasks/ee/yum.yml b/roles/docker/tasks/ee/yum.yml
index 36a02e4..3b45e7d 100644
--- a/roles/docker/tasks/ee/yum.yml
+++ b/roles/docker/tasks/ee/yum.yml
@@ -1,41 +1,31 @@
---
+# code: language=ansible
- name: Docker | EE | Store Docker EE repository URL
- copy:
+ ansible.builtin.copy:
content: "{{ docker_ee_url }}"
dest: /etc/yum/vars/dockerurl
+ mode: "0644"
- name: Docker | EE | YUM | Install yum-utils
- yum: name=yum-utils
+ ansible.builtin.yum:
+ name: yum-utils
register: task_result
until: task_result is success
retries: 10
delay: 2
-- name: Docker | EE | YUM | Deploy repository # noqa 305
- shell: "yum-config-manager --add-repo {{ docker_ee_url }}/docker-ee.repo"
+- name: Docker | EE | YUM | Deploy repository
+ ansible.builtin.command: yum-config-manager --add-repo {{ docker_ee_url }}/docker-ee.repo
args:
creates: /etc/yum.repos.d/docker-ee.repo
- name: Docker | EE | YUM | Perform specific os tasks
- include: os/{{ ansible_distribution|lower }}.yml
-
-- name: Docker | EE | YUM | Remove older Docker installations
- yum: name={{ item }} state=absent
- with_items:
- - docker
- - docker-common
- - docker-selinux
- - container-selinux
- - docker-engine-selinux
- - docker-engine
- - docker-ce
- register: task_result
- until: task_result is success
- retries: 10
- delay: 2
+ ansible.builtin.include_tasks: os/{{ ansible_distribution | lower }}.yml
- name: Docker | EE | YUM | Install Docker Application
- yum: name=docker-ee state=present
+ ansible.builtin.yum:
+ name: docker-ee
+ state: present
notify: Docker | Restart Docker
register: task_result
until: task_result is success
diff --git a/roles/docker/tasks/main.yml b/roles/docker/tasks/main.yml
index d700127..6d4e8f6 100644
--- a/roles/docker/tasks/main.yml
+++ b/roles/docker/tasks/main.yml
@@ -1,64 +1,63 @@
---
+# code: language=ansible
# tasks file for docker
- name: Check ansible version
when:
- ansible_version.full is version('2.4', '<')
- debug:
+ ansible.builtin.debug:
msg: >-
"This role works best with ansible version 2.4 or greater.
It is recommended to use the latest ansible version for the best experience."
- name: Docker | Manage OS not supported by docker-ce
- fail:
- msg: "This OS is not supported by Docker-CE, and therefor not supported by this role."
- when:
- - docker_edition == "ce"
- - (ansible_distribution|lower == "centos" and ansible_distribution_major_version == "6") or
- ansible_distribution|lower == "redhat" or
- ansible_distribution|lower == "oraclelinux"
+ ansible.builtin.fail:
+ msg: This OS is not supported by Docker-CE, and therefor not supported by this role.
+ when: docker_edition == "ce" and
+ (ansible_distribution | lower == "centos" and ansible_distribution_major_version == "6") or
+ ansible_distribution | lower == "redhat" or
+ ansible_distribution | lower == "oraclelinux"
-- name: Docker | Include {{ ansible_distribution }} specific variables
- include_vars: "ansible_distribution/{{ ansible_distribution.split(' ', 1)[0]|lower }}.yml"
+- name: Docker | Include distribution specific variables | {{ ansible_distribution }}
+ ansible.builtin.include_vars: ansible_distribution/{{ ansible_distribution.split(' ', 1)[0] | lower }}.yml
-- name: Docker | Include {{ ansible_os_family }} Family specific variables
- include_vars: "ansible_os_family/{{ ansible_os_family.split(' ', 1)[0]|lower }}.yml"
+- name: Docker | Include OS Family specific variables | {{ ansible_os_family }}
+ ansible.builtin.include_vars: ansible_os_family/{{ ansible_os_family.split(' ', 1)[0] | lower }}.yml
- name: Docker | EE | Check Requirements
- fail:
- msg: "Variable docker_ee_url is required and is not defined."
+ ansible.builtin.fail:
+ msg: Variable docker_ee_url is required and is not defined.
when:
- docker_ee_url is not defined
- docker_edition == "ee"
- name: Docker | Storage Driver
- include_tasks: "storage_drivers/{{ docker_storage_driver }}.yml"
+ ansible.builtin.include_tasks: storage_drivers/{{ docker_storage_driver }}.yml
when: docker_storage_driver is defined
- name: Docker | Start Installation
- include_tasks: "{{ docker_edition }}/{{ ansible_pkg_mgr }}.yml"
+ ansible.builtin.include_tasks: "{{ docker_edition }}/{{ ansible_pkg_mgr }}.yml"
when: docker_repo == "docker"
- name: Docker | Start Installation | Other repo
- include_tasks: other_repo.yml
+ ansible.builtin.include_tasks: other_repo.yml
when: docker_repo == "other"
- name: Docker | Ensure service starts at boot
- service:
+ ansible.builtin.service:
name: docker
enabled: "{{ docker_service_enabled }}"
- name: Docker | Deploy Config
- include_tasks: deploy_config.yml
-
+ ansible.builtin.include_tasks: deploy_config.yml
- name: Docker | Proxy configuration
- include_tasks: proxy.yml
- when: docker_http_proxy is defined or
- docker_https_proxy is defined or
- docker_no_proxy_params is defined
+ ansible.builtin.include_tasks: proxy.yml
+ when: docker_http_proxy is defined or docker_https_proxy is defined or docker_no_proxy_params is defined
- name: Docker | Add users to docker group
- include_tasks: docker_users.yml
+ ansible.builtin.include_tasks: docker_users.yml
when: docker_users is defined
- name: Docker | Ensure service started
- service: name=docker state=started
+ ansible.builtin.service:
+ name: docker
+ state: started
diff --git a/roles/docker/tasks/other_repo.yml b/roles/docker/tasks/other_repo.yml
index 9d38ce3..c1aa3d5 100644
--- a/roles/docker/tasks/other_repo.yml
+++ b/roles/docker/tasks/other_repo.yml
@@ -1,7 +1,8 @@
---
+# code: language=ansible
- name: Docker | Start Installation | Other repo
- package:
- name: "docker-{{ docker_edition }}"
+ ansible.builtin.package:
+ name: docker-{{ docker_edition }}
when:
- docker_repo == "other"
register: task_result
diff --git a/roles/docker/tasks/proxy.yml b/roles/docker/tasks/proxy.yml
index f7b0df6..be3420a 100644
--- a/roles/docker/tasks/proxy.yml
+++ b/roles/docker/tasks/proxy.yml
@@ -1,9 +1,16 @@
---
+# code: language=ansible
- name: Docker | Proxy | Create docker.service.d folder
- file: path=/etc/systemd/system/docker.service.d state=directory mode=0755
+ ansible.builtin.file:
+ path: /etc/systemd/system/docker.service.d
+ state: directory
+ mode: "0755"
- name: Docker | Proxy | Docker service params
- template: src=http-proxy.conf.j2 dest=/etc/systemd/system/docker.service.d/http-proxy.conf
+ ansible.builtin.template:
+ src: http-proxy.conf.j2
+ dest: /etc/systemd/system/docker.service.d/http-proxy.conf
+ mode: "0644"
notify:
- Docker | Daemon-reload
- Docker | Restart Docker
diff --git a/roles/docker/tasks/storage_drivers/aufs.yml b/roles/docker/tasks/storage_drivers/aufs.yml
index 305f011..a9ad4a6 100644
--- a/roles/docker/tasks/storage_drivers/aufs.yml
+++ b/roles/docker/tasks/storage_drivers/aufs.yml
@@ -1,6 +1,7 @@
---
+# code: language=ansible
- name: Docker | Storage Driver | AUFS | Install dependencies for Ubuntu/Debian
- apt:
+ ansible.builtin.apt:
name:
- linux-image-extra-{{ ansible_kernel }}
- linux-image-extra-virtual
@@ -14,6 +15,6 @@
delay: 2
- name: Docker | Storage Driver | AUFS | Enable AUFS driver
- modprobe:
+ community.general.modprobe:
name: aufs
state: present
diff --git a/roles/docker/tasks/storage_drivers/btrfs.yml b/roles/docker/tasks/storage_drivers/btrfs.yml
index 6a5005a..35ea821 100644
--- a/roles/docker/tasks/storage_drivers/btrfs.yml
+++ b/roles/docker/tasks/storage_drivers/btrfs.yml
@@ -1,6 +1,9 @@
---
+# code: language=ansible
- name: Docker | Storage Driver | Btrfs | Install Btrfs package
- package: name={{ docker_btrfs_package }} state=present
+ ansible.builtin.package:
+ name: "{{ docker_btrfs_package }}"
+ state: present
when: ansible_os_family == "Debian"
register: task_result
until: task_result is success
@@ -8,25 +11,26 @@
delay: 2
- name: Docker | Storage Driver | Btrfs | Enable btrfs driver
- modprobe:
+ community.general.modprobe:
name: btrfs
state: present
- name: Docker | Storage Driver | Btrfs | Create Btfs storage filesystem
- filesystem:
+ community.general.filesystem:
dev: "{{ docker_block_device }}"
fstype: btrfs
- name: Docker | Storage Driver | Btrfs | Create the /var/lib/docker folder
- file:
+ ansible.builtin.file:
dest: /var/lib/docker
state: directory
+ mode: "0755"
- name: Docker | Storage Driver | Btrfs | Mount the filesystem
- mount:
- dest: /var/lib/docker
+ ansible.posix.mount:
+ path: /var/lib/docker
src: "{{ docker_block_device }}"
fstype: btrfs
- passno: '0'
+ passno: "0"
opts: "{{ docker_mount_opts | default(omit) }}"
state: mounted
diff --git a/roles/docker/tasks/storage_drivers/devicemapper.yml b/roles/docker/tasks/storage_drivers/devicemapper.yml
index f1da84e..159c679 100644
--- a/roles/docker/tasks/storage_drivers/devicemapper.yml
+++ b/roles/docker/tasks/storage_drivers/devicemapper.yml
@@ -1,57 +1,64 @@
---
+# code: language=ansible
- name: Docker | Storage Driver | devicemapper | Install LVM2
- package: name=lvm2 state=present
+ ansible.builtin.package:
+ name: lvm2
+ state: present
register: task_result
until: task_result is success
retries: 10
delay: 2
- name: Docker | Storage Driver | devicemapper | Configure logical volume group
- lvg:
+ community.general.lvg:
vg: docker
pvs: "{{ docker_block_device }}"
when: docker_block_device is defined
- name: Docker | Storage Driver | devicemapper | Create thinpool volume
- lvol:
+ community.general.lvol:
vg: docker
lv: thinpool
size: 95%VG
- opts: "--wipesignatures y"
+ opts: --wipesignatures y
register: thinpool
when: docker_block_device is defined
- name: Docker | Storage Driver | devicemapper | Create thinpoolmeta volume
- lvol:
+ community.general.lvol:
vg: docker
lv: thinpoolmeta
size: 1%VG
- opts: "--wipesignatures y"
+ opts: --wipesignatures y
when: docker_block_device is defined
-- name: Docker | Storage Driver | devicemapper | Convert volumes to thinpool # noqa 305 503
- shell: lvconvert -y --zero n -c 512K --thinpool docker/thinpool --poolmetadata docker/thinpoolmeta
+- name: Docker | Storage Driver | devicemapper | Convert volumes to thinpool # noqa no-handler no-changed-when
+ ansible.builtin.command: lvconvert -y --zero n -c 512K --thinpool docker/thinpool --poolmetadata docker/thinpoolmeta
when: thinpool.changed
- name: Docker | Storage Driver | devicemapper | Configure autoextension of thin pools via 'lvm' profile
- copy:
+ ansible.builtin.copy:
src: docker-thinpool.profile
dest: /etc/lvm/profile/docker-thinpool.profile
+ mode: "0644"
register: docker_thinpool_profile
notify: Docker | Restart Docker
when: docker_block_device is defined
-- name: Docker | Storage Driver | devicemapper | Apply 'lvm' profile # noqa 305 503
- shell: lvchange --metadataprofile docker-thinpool docker/thinpool
+- name: Docker | Storage Driver | devicemapper | Apply 'lvm' profile # noqa no-handler no-changed-when
+ ansible.builtin.command: lvchange --metadataprofile docker-thinpool docker/thinpool
when: docker_thinpool_profile.changed
- name: Docker | Storage Driver | devicemapper | Make sure /var/lib/docker is Created
- file: path=/var/lib/docker state=directory
+ ansible.builtin.file:
+ path: /var/lib/docker
+ state: directory
+ mode: "0755"
- name: Docker | STorage Driver | devicemapper | Set the docker_storage_opts
- set_fact:
+ ansible.builtin.set_fact:
docker_storage_opts:
- - "dm.thinpooldev=/dev/mapper/docker-thinpool"
- - "dm.use_deferred_removal=true"
- - "dm.use_deferred_deletion=true"
+ - dm.thinpooldev=/dev/mapper/docker-thinpool
+ - dm.use_deferred_removal=true
+ - dm.use_deferred_deletion=true
when: docker_storage_opts is undefined
diff --git a/roles/docker/tasks/storage_drivers/overlay.yml b/roles/docker/tasks/storage_drivers/overlay.yml
index 91d1ac1..100173b 100644
--- a/roles/docker/tasks/storage_drivers/overlay.yml
+++ b/roles/docker/tasks/storage_drivers/overlay.yml
@@ -1,5 +1,6 @@
---
+# code: language=ansible
- name: Docker | Storage Driver | overlay | Enable overlay driver
- modprobe:
+ community.general.modprobe:
name: overlay
state: present
diff --git a/roles/docker/tasks/storage_drivers/overlay2.yml b/roles/docker/tasks/storage_drivers/overlay2.yml
index a53e62b..2d69bcf 100644
--- a/roles/docker/tasks/storage_drivers/overlay2.yml
+++ b/roles/docker/tasks/storage_drivers/overlay2.yml
@@ -1,17 +1,18 @@
---
+# code: language=ansible
- name: Docker | Storage Driver | overlay2 | Check kernel version for 4.0.0
- assert:
+ ansible.builtin.assert:
that: "{{ ansible_kernel is version('4.0.0', '>=') }}"
- msg: "Please upgrade to kernel 4.0.0 or higher."
+ msg: Please upgrade to kernel 4.0.0 or higher.
when: ansible_os_family|lower != "redhat"
- name: Docker | Storage Driver | overlay2 | Check kernel version for 3.10.0-514
- assert:
+ ansible.builtin.assert:
that: "{{ ansible_kernel is version('3.10.0-514', '>=') }}"
- msg: "Please upgrade to kernel 3.10.0-514 or higher."
+ msg: Please upgrade to kernel 3.10.0-514 or higher.
when: ansible_os_family|lower == "redhat"
- name: Docker | Storage Driver | overlay2 | Enable overlay driver
- modprobe:
+ community.general.modprobe:
name: overlay
state: present
diff --git a/roles/docker/tasks/storage_drivers/zfs.yml b/roles/docker/tasks/storage_drivers/zfs.yml
index 668ff97..9b4f5c8 100644
--- a/roles/docker/tasks/storage_drivers/zfs.yml
+++ b/roles/docker/tasks/storage_drivers/zfs.yml
@@ -1,2 +1,3 @@
---
+# code: language=ansible
# Needs build from https://docs.docker.com/engine/userguide/storagedriver/zfs-driver/
diff --git a/roles/docker/vars/ansible_distribution/centos.yml b/roles/docker/vars/ansible_distribution/centos.yml
index fe47536..78accfc 100644
--- a/roles/docker/vars/ansible_distribution/centos.yml
+++ b/roles/docker/vars/ansible_distribution/centos.yml
@@ -1,4 +1,5 @@
---
+# code: language=ansible
# CentOS vars file for docker
docker_ce_repo_url: https://download.docker.com/linux/centos
diff --git a/roles/docker/vars/ansible_distribution/debian.yml b/roles/docker/vars/ansible_distribution/debian.yml
index 9972201..026bf5a 100644
--- a/roles/docker/vars/ansible_distribution/debian.yml
+++ b/roles/docker/vars/ansible_distribution/debian.yml
@@ -1,9 +1,10 @@
---
+# code: language=ansible
# Debian vars file for docker
docker_ce_repo_url: https://download.docker.com/linux/debian
docker_ce_gpg_key: "{{ docker_ce_repo_url }}/gpg"
docker_ce_gpg_key_id: 9DC858229FC7DD38854AE2D88D81803C0EBFCD88
docker_ce_gpg_key_validate_certs: true
-docker_apt_repo_url: "deb [arch=amd64] {{ docker_ce_repo_url }} {{ ansible_distribution_release }} stable"
-docker_apt_repo_url_edge: "deb [arch=amd64] {{ docker_ce_repo_url }} {{ ansible_distribution_release }} edge"
+docker_apt_repo_url: deb [arch={{ docker_architecture }}] {{ docker_ce_repo_url }} {{ ansible_distribution_release }} stable
+docker_apt_repo_url_edge: deb [arch={{ docker_architecture }}] {{ docker_ce_repo_url }} {{ ansible_distribution_release }} edge
diff --git a/roles/docker/vars/ansible_distribution/fedora.yml b/roles/docker/vars/ansible_distribution/fedora.yml
index c9fc63b..ba5fad4 100644
--- a/roles/docker/vars/ansible_distribution/fedora.yml
+++ b/roles/docker/vars/ansible_distribution/fedora.yml
@@ -1,4 +1,5 @@
---
+# code: language=ansible
# Fedora vars file for docker
docker_ce_repo_url: https://download.docker.com/linux/fedora
diff --git a/roles/docker/vars/ansible_distribution/main.yml b/roles/docker/vars/ansible_distribution/main.yml
deleted file mode 100644
index 3806b4c..0000000
--- a/roles/docker/vars/ansible_distribution/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-# vars file for docker
diff --git a/roles/docker/vars/ansible_distribution/opensuse.yml b/roles/docker/vars/ansible_distribution/opensuse.yml
index fe26b18..cb44736 100644
--- a/roles/docker/vars/ansible_distribution/opensuse.yml
+++ b/roles/docker/vars/ansible_distribution/opensuse.yml
@@ -1,4 +1,5 @@
---
+# code: language=ansible
# OpenSUSE vars file for docker
docker_ce_repo_url: https://download.docker.com/linux/opensuse
diff --git a/roles/docker/vars/ansible_distribution/oraclelinux.yml b/roles/docker/vars/ansible_distribution/oraclelinux.yml
index 4e55b00..99a6ed4 100644
--- a/roles/docker/vars/ansible_distribution/oraclelinux.yml
+++ b/roles/docker/vars/ansible_distribution/oraclelinux.yml
@@ -1,4 +1,5 @@
---
+# code: language=ansible
# OracleLinux vars file for docker
-docker_package_directory: "oraclelinux"
+docker_package_directory: oraclelinux
diff --git a/roles/docker/vars/ansible_distribution/redhat.yml b/roles/docker/vars/ansible_distribution/redhat.yml
index 48c797c..b1d5fff 100644
--- a/roles/docker/vars/ansible_distribution/redhat.yml
+++ b/roles/docker/vars/ansible_distribution/redhat.yml
@@ -1,4 +1,5 @@
---
+# code: language=ansible
# RedHat vars file for docker
docker_ce_repo_url: https://download.docker.com/linux/centos
diff --git a/roles/docker/vars/ansible_distribution/ubuntu.yml b/roles/docker/vars/ansible_distribution/ubuntu.yml
index 1cb31db..604d4bb 100644
--- a/roles/docker/vars/ansible_distribution/ubuntu.yml
+++ b/roles/docker/vars/ansible_distribution/ubuntu.yml
@@ -1,9 +1,10 @@
---
+# code: language=ansible
# Ubuntu vars file for docker
docker_ce_repo_url: https://download.docker.com/linux/ubuntu
docker_ce_gpg_key: "{{ docker_ce_repo_url }}/gpg"
docker_ce_gpg_key_id: 9DC858229FC7DD38854AE2D88D81803C0EBFCD88
docker_ce_gpg_key_validate_certs: true
-docker_apt_repo_url: "deb [arch=amd64] {{ docker_ce_repo_url }} {{ ansible_distribution_release }} stable"
-docker_apt_repo_url_edge: "deb [arch=amd64] {{ docker_ce_repo_url }} {{ ansible_distribution_release }} edge"
+docker_apt_repo_url: deb [arch={{ docker_architecture }}] {{ docker_ce_repo_url }} {{ ansible_distribution_release }} stable
+docker_apt_repo_url_edge: deb [arch={{ docker_architecture }}] {{ docker_ce_repo_url }} {{ ansible_distribution_release }} edge
diff --git a/roles/docker/vars/ansible_os_family/debian.yml b/roles/docker/vars/ansible_os_family/debian.yml
index cccb4e0..700f21d 100644
--- a/roles/docker/vars/ansible_os_family/debian.yml
+++ b/roles/docker/vars/ansible_os_family/debian.yml
@@ -1,2 +1,3 @@
---
+# code: language=ansible
docker_btrfs_package: btrfs-tools
diff --git a/roles/docker/vars/ansible_os_family/redhat.yml b/roles/docker/vars/ansible_os_family/redhat.yml
index 3caddfe..560399a 100644
--- a/roles/docker/vars/ansible_os_family/redhat.yml
+++ b/roles/docker/vars/ansible_os_family/redhat.yml
@@ -1,2 +1,3 @@
---
+# code: language=ansible
docker_btrfs_package: btrfs-progs
diff --git a/roles/docker/vars/ansible_os_family/suse.yml b/roles/docker/vars/ansible_os_family/suse.yml
index 3caddfe..560399a 100644
--- a/roles/docker/vars/ansible_os_family/suse.yml
+++ b/roles/docker/vars/ansible_os_family/suse.yml
@@ -1,2 +1,3 @@
---
+# code: language=ansible
docker_btrfs_package: btrfs-progs
diff --git a/roles/docker/vars/main.yml b/roles/docker/vars/main.yml
new file mode 100644
index 0000000..4baab3e
--- /dev/null
+++ b/roles/docker/vars/main.yml
@@ -0,0 +1,11 @@
+---
+# code: language=ansible
+
+docker_architecture_mapping:
+ x86_64: amd64
+ ppc64le: ppc64el
+ s390x: s390x
+ armv7l: armhf
+ aarch64: arm64
+
+docker_architecture: "{{ docker_architecture_mapping[ansible_architecture] }}"