mirror of
https://github.com/geerlingguy/ansible-role-docker.git
synced 2025-08-15 13:48:28 +02:00
Merge branch 'master' into checksums
This commit is contained in:
commit
168c279d22
4
.github/FUNDING.yml
vendored
Normal file
4
.github/FUNDING.yml
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# These are supported funding model platforms
|
||||||
|
---
|
||||||
|
github: geerlingguy
|
||||||
|
patreon: geerlingguy
|
@ -6,16 +6,16 @@ env:
|
|||||||
global:
|
global:
|
||||||
- ROLE_NAME: docker
|
- ROLE_NAME: docker
|
||||||
matrix:
|
matrix:
|
||||||
|
- MOLECULE_DISTRO: centos8
|
||||||
- MOLECULE_DISTRO: centos7
|
- MOLECULE_DISTRO: centos7
|
||||||
- MOLECULE_DISTRO: ubuntu1804
|
- MOLECULE_DISTRO: ubuntu1804
|
||||||
- MOLECULE_DISTRO: ubuntu1604
|
- MOLECULE_DISTRO: ubuntu1604
|
||||||
- MOLECULE_DISTRO: ubuntu1404
|
- MOLECULE_DISTRO: debian10
|
||||||
- MOLECULE_DISTRO: debian9
|
- MOLECULE_DISTRO: debian9
|
||||||
- MOLECULE_DISTRO: fedora27
|
|
||||||
|
|
||||||
install:
|
install:
|
||||||
# Install test dependencies.
|
# Install test dependencies.
|
||||||
- pip install molecule docker
|
- pip install molecule yamllint ansible-lint docker
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
# Use actual Ansible Galaxy role name for the project directory.
|
# Use actual Ansible Galaxy role name for the project directory.
|
||||||
|
@ -41,8 +41,8 @@ Docker Compose installation options.
|
|||||||
(Used only for Debian/Ubuntu.) You can switch the channel to `edge` if you want to use the Edge release.
|
(Used only for Debian/Ubuntu.) You can switch the channel to `edge` if you want to use the Edge release.
|
||||||
|
|
||||||
docker_yum_repo_url: https://download.docker.com/linux/centos/docker-{{ docker_edition }}.repo
|
docker_yum_repo_url: https://download.docker.com/linux/centos/docker-{{ docker_edition }}.repo
|
||||||
docker_yum_repo_enable_edge: 0
|
docker_yum_repo_enable_edge: '0'
|
||||||
docker_yum_repo_enable_test: 0
|
docker_yum_repo_enable_test: '0'
|
||||||
|
|
||||||
(Used only for RedHat/CentOS.) You can enable the Edge or Test repo by setting the respective vars to `1`.
|
(Used only for RedHat/CentOS.) You can enable the Edge or Test repo by setting the respective vars to `1`.
|
||||||
|
|
||||||
|
@ -22,8 +22,8 @@ docker_apt_ignore_key_error: true
|
|||||||
|
|
||||||
# Used only for RedHat/CentOS/Fedora.
|
# Used only for RedHat/CentOS/Fedora.
|
||||||
docker_yum_repo_url: https://download.docker.com/linux/{{ (ansible_distribution == "Fedora") | ternary("fedora","centos") }}/docker-{{ docker_edition }}.repo
|
docker_yum_repo_url: https://download.docker.com/linux/{{ (ansible_distribution == "Fedora") | ternary("fedora","centos") }}/docker-{{ docker_edition }}.repo
|
||||||
docker_yum_repo_enable_edge: 0
|
docker_yum_repo_enable_edge: '0'
|
||||||
docker_yum_repo_enable_test: 0
|
docker_yum_repo_enable_test: '0'
|
||||||
|
|
||||||
# A list of users who will be added to the docker group.
|
# A list of users who will be added to the docker group.
|
||||||
docker_users: []
|
docker_users: []
|
||||||
|
@ -10,18 +10,17 @@ galaxy_info:
|
|||||||
platforms:
|
platforms:
|
||||||
- name: EL
|
- name: EL
|
||||||
versions:
|
versions:
|
||||||
- 6
|
|
||||||
- 7
|
- 7
|
||||||
|
- 8
|
||||||
- name: Fedora
|
- name: Fedora
|
||||||
versions:
|
versions:
|
||||||
- all
|
- all
|
||||||
- name: Debian
|
- name: Debian
|
||||||
versions:
|
versions:
|
||||||
- jessie
|
|
||||||
- stretch
|
- stretch
|
||||||
|
- buster
|
||||||
- name: Ubuntu
|
- name: Ubuntu
|
||||||
versions:
|
versions:
|
||||||
- trusty
|
|
||||||
- xenial
|
- xenial
|
||||||
- bionic
|
- bionic
|
||||||
galaxy_tags:
|
galaxy_tags:
|
||||||
|
@ -3,10 +3,9 @@ dependency:
|
|||||||
name: galaxy
|
name: galaxy
|
||||||
driver:
|
driver:
|
||||||
name: docker
|
name: docker
|
||||||
lint:
|
lint: |
|
||||||
name: yamllint
|
yamllint .
|
||||||
options:
|
ansible-lint
|
||||||
config-file: molecule/default/yaml-lint.yml
|
|
||||||
platforms:
|
platforms:
|
||||||
- name: instance
|
- name: instance
|
||||||
image: "geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible:latest"
|
image: "geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible:latest"
|
||||||
@ -17,13 +16,5 @@ platforms:
|
|||||||
pre_build_image: true
|
pre_build_image: true
|
||||||
provisioner:
|
provisioner:
|
||||||
name: ansible
|
name: ansible
|
||||||
lint:
|
|
||||||
name: ansible-lint
|
|
||||||
playbooks:
|
playbooks:
|
||||||
converge: ${MOLECULE_PLAYBOOK:-playbook.yml}
|
converge: ${MOLECULE_PLAYBOOK:-converge.yml}
|
||||||
scenario:
|
|
||||||
name: default
|
|
||||||
verifier:
|
|
||||||
name: testinfra
|
|
||||||
lint:
|
|
||||||
name: flake8
|
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Ensure containerd service dir exists.
|
|
||||||
file:
|
|
||||||
path: /etc/systemd/system/containerd.service.d
|
|
||||||
state: directory
|
|
||||||
|
|
||||||
- name: Add shim to ensure Docker can start in all environments.
|
|
||||||
template:
|
|
||||||
src: override.conf.j2
|
|
||||||
dest: /etc/systemd/system/containerd.service.d/override.conf
|
|
||||||
register: override_template
|
|
||||||
|
|
||||||
- name: Reload systemd daemon if template is changed.
|
|
||||||
systemd:
|
|
||||||
daemon_reload: true
|
|
||||||
when: override_template is changed
|
|
@ -11,10 +11,6 @@
|
|||||||
state: "{{ docker_package_state }}"
|
state: "{{ docker_package_state }}"
|
||||||
notify: restart docker
|
notify: restart docker
|
||||||
|
|
||||||
# TODO: Remove this shim once 18.09.1 or later is released.
|
|
||||||
- import_tasks: docker-1809-shim.yml
|
|
||||||
when: ansible_service_mgr == 'systemd'
|
|
||||||
|
|
||||||
- name: Ensure Docker is started and enabled at boot.
|
- name: Ensure Docker is started and enabled at boot.
|
||||||
service:
|
service:
|
||||||
name: docker
|
name: docker
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
name:
|
name:
|
||||||
- apt-transport-https
|
- apt-transport-https
|
||||||
- ca-certificates
|
- ca-certificates
|
||||||
|
- gnupg2
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: Add Docker apt key.
|
- name: Add Docker apt key.
|
||||||
|
@ -33,3 +33,9 @@
|
|||||||
section: 'docker-{{ docker_edition }}-test'
|
section: 'docker-{{ docker_edition }}-test'
|
||||||
option: enabled
|
option: enabled
|
||||||
value: '{{ docker_yum_repo_enable_test }}'
|
value: '{{ docker_yum_repo_enable_test }}'
|
||||||
|
|
||||||
|
- name: Install containerd separately (CentOS 8).
|
||||||
|
package:
|
||||||
|
name: https://download.docker.com/linux/centos/7/x86_64/stable/Packages/containerd.io-1.2.6-3.3.el7.x86_64.rpm
|
||||||
|
state: present
|
||||||
|
when: ansible_distribution_major_version | int == 8
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
# {{ ansible_managed }}
|
|
||||||
[Service]
|
|
||||||
ExecStartPre=
|
|
Loading…
Reference in New Issue
Block a user