mirror of
https://github.com/geerlingguy/ansible-role-docker.git
synced 2024-11-23 19:06:54 +01:00
Merge branch 'master' into use-ansible-facts
This commit is contained in:
commit
f6636e34b5
@ -25,7 +25,7 @@ You can also specify a specific version of Docker to install using the distribut
|
|||||||
Red Hat/CentOS: `docker-{{ docker_edition }}-<VERSION>` (Note: you have to add this to all packages);
|
Red Hat/CentOS: `docker-{{ docker_edition }}-<VERSION>` (Note: you have to add this to all packages);
|
||||||
Debian/Ubuntu: `docker-{{ docker_edition }}=<VERSION>` (Note: you have to add this to all packages).
|
Debian/Ubuntu: `docker-{{ docker_edition }}=<VERSION>` (Note: you have to add this to all packages).
|
||||||
|
|
||||||
You can control whether the package is installed, uninstalled, or at the latest version by setting `docker_package_state` to `present`, `absent`, or `latest`, respectively. Note that the Docker daemon will be automatically restarted if the Docker package is updated. This is a side effect of flushing all handlers (running any of the handlers that have been notified by this and any other role up to this point in the play).
|
You can control whether the package is installed, uninstalled, or at the latest version by setting `docker_packages_state` to `present`, `absent`, or `latest`, respectively. Note that the Docker daemon will be automatically restarted if the Docker package is updated. This is a side effect of flushing all handlers (running any of the handlers that have been notified by this and any other role up to this point in the play).
|
||||||
|
|
||||||
docker_service_manage: true
|
docker_service_manage: true
|
||||||
docker_service_state: started
|
docker_service_state: started
|
||||||
@ -60,6 +60,7 @@ The main Docker repo URL, common between Debian and RHEL systems.
|
|||||||
docker_apt_repository: "deb [arch={{ docker_apt_arch }}] {{ docker_repo_url }}/{{ ansible_distribution | lower }} {{ ansible_distribution_release }} {{ docker_apt_release_channel }}"
|
docker_apt_repository: "deb [arch={{ docker_apt_arch }}] {{ docker_repo_url }}/{{ ansible_distribution | lower }} {{ ansible_distribution_release }} {{ docker_apt_release_channel }}"
|
||||||
docker_apt_ignore_key_error: True
|
docker_apt_ignore_key_error: True
|
||||||
docker_apt_gpg_key: "{{ docker_repo_url }}/{{ ansible_distribution | lower }}/gpg"
|
docker_apt_gpg_key: "{{ docker_repo_url }}/{{ ansible_distribution | lower }}/gpg"
|
||||||
|
docker_apt_filename: ""
|
||||||
|
|
||||||
(Used only for Debian/Ubuntu.) You can switch the channel to `nightly` if you want to use the Nightly release.
|
(Used only for Debian/Ubuntu.) You can switch the channel to `nightly` if you want to use the Nightly release.
|
||||||
|
|
||||||
|
@ -15,12 +15,12 @@ docker_service_enabled: true
|
|||||||
docker_restart_handler_state: restarted
|
docker_restart_handler_state: restarted
|
||||||
|
|
||||||
# Docker Compose Plugin options.
|
# Docker Compose Plugin options.
|
||||||
docker_install_compose_plugin: false
|
docker_install_compose_plugin: true
|
||||||
docker_compose_package: docker-compose-plugin
|
docker_compose_package: docker-compose-plugin
|
||||||
docker_compose_package_state: present
|
docker_compose_package_state: present
|
||||||
|
|
||||||
# Docker Compose options.
|
# Docker Compose options.
|
||||||
docker_install_compose: true
|
docker_install_compose: false
|
||||||
docker_compose_version: "v2.11.1"
|
docker_compose_version: "v2.11.1"
|
||||||
docker_compose_arch: "{{ ansible_facts.architecture }}"
|
docker_compose_arch: "{{ ansible_facts.architecture }}"
|
||||||
docker_compose_url: "https://github.com/docker/compose/releases/download/{{ docker_compose_version }}/docker-compose-linux-{{ docker_compose_arch }}"
|
docker_compose_url: "https://github.com/docker/compose/releases/download/{{ docker_compose_version }}/docker-compose-linux-{{ docker_compose_arch }}"
|
||||||
@ -32,13 +32,17 @@ docker_add_repo: true
|
|||||||
# Docker repo URL.
|
# Docker repo URL.
|
||||||
docker_repo_url: https://download.docker.com/linux
|
docker_repo_url: https://download.docker.com/linux
|
||||||
|
|
||||||
# Used only for Debian/Ubuntu. Switch 'stable' to 'nightly' if needed.
|
# Used only for Debian/Ubuntu/Pop!_OS/Linux Mint. Switch 'stable' to 'nightly' if needed.
|
||||||
docker_apt_release_channel: stable
|
docker_apt_release_channel: stable
|
||||||
|
# docker_apt_ansible_distribution is a workaround for Ubuntu variants which can't be identified as such by Ansible,
|
||||||
|
# and is only necessary until Docker officially supports them.
|
||||||
|
docker_apt_ansible_distribution: "{{ 'ubuntu' if ansible_facts.distribution in ['Pop!_OS', 'Linux Mint'] else ansible_facts.distribution }}"
|
||||||
docker_apt_arch: "{{ 'arm64' if ansible_facts.architecture == 'aarch64' else 'amd64' }}"
|
docker_apt_arch: "{{ 'arm64' if ansible_facts.architecture == 'aarch64' else 'amd64' }}"
|
||||||
docker_apt_repository: "deb [arch={{ docker_apt_arch }} signed-by=/etc/apt/trusted.gpg.d/docker.asc] {{ docker_repo_url }}/{{ ansible_facts.distribution | lower }} {{ ansible_facts.distribution_release }} {{ docker_apt_release_channel }}"
|
docker_apt_repository: "deb [arch={{ docker_apt_arch }} signed-by=/etc/apt/trusted.gpg.d/docker.asc] {{ docker_repo_url }}/{{ ansible_facts.distribution | lower }} {{ ansible_facts.distribution_release }} {{ docker_apt_release_channel }}"
|
||||||
docker_apt_ignore_key_error: true
|
docker_apt_ignore_key_error: true
|
||||||
docker_apt_gpg_key: "{{ docker_repo_url }}/{{ ansible_facts.distribution | lower }}/gpg"
|
docker_apt_gpg_key: "{{ docker_repo_url }}/{{ ansible_facts.distribution | lower }}/gpg"
|
||||||
docker_apt_gpg_key_checksum: "sha256:1500c1f56fa9e26b9b8f42452a553675796ade0807cdce11975eb98170b3a570"
|
docker_apt_gpg_key_checksum: "sha256:1500c1f56fa9e26b9b8f42452a553675796ade0807cdce11975eb98170b3a570"
|
||||||
|
docker_apt_filename: "docker"
|
||||||
|
|
||||||
# Used only for RedHat/CentOS/Fedora.
|
# Used only for RedHat/CentOS/Fedora.
|
||||||
docker_yum_repo_url: "{{ docker_repo_url }}/{{ (ansible_facts.distribution == 'Fedora') | ternary('fedora','centos') }}/docker-{{ docker_edition }}.repo"
|
docker_yum_repo_url: "{{ docker_repo_url }}/{{ (ansible_facts.distribution == 'Fedora') | ternary('fedora','centos') }}/docker-{{ docker_edition }}.repo"
|
||||||
|
@ -50,5 +50,6 @@
|
|||||||
apt_repository:
|
apt_repository:
|
||||||
repo: "{{ docker_apt_repository }}"
|
repo: "{{ docker_apt_repository }}"
|
||||||
state: present
|
state: present
|
||||||
|
filename: "{{ docker_apt_filename }}"
|
||||||
update_cache: true
|
update_cache: true
|
||||||
when: docker_add_repo | bool
|
when: docker_add_repo | bool
|
||||||
|
@ -44,6 +44,11 @@
|
|||||||
|
|
||||||
- name: Configure containerd on RHEL 8.
|
- name: Configure containerd on RHEL 8.
|
||||||
block:
|
block:
|
||||||
|
- name: Ensure runc is not installed.
|
||||||
|
package:
|
||||||
|
name: runc
|
||||||
|
state: absent
|
||||||
|
|
||||||
- name: Ensure container-selinux is installed.
|
- name: Ensure container-selinux is installed.
|
||||||
package:
|
package:
|
||||||
name: container-selinux
|
name: container-selinux
|
||||||
|
Loading…
Reference in New Issue
Block a user