Merge branch 'master' into add_proxy_into_systemd_environment

This commit is contained in:
Teebor-Choka 2020-03-06 21:32:25 +01:00 committed by GitHub
commit d132eed030
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 104 additions and 57 deletions

2
.ansible-lint Normal file
View File

@ -0,0 +1,2 @@
skip_list:
- '306'

4
.github/FUNDING.yml vendored Normal file
View File

@ -0,0 +1,4 @@
# These are supported funding model platforms
---
github: geerlingguy
patreon: geerlingguy

56
.github/stale.yml vendored Normal file
View File

@ -0,0 +1,56 @@
# Configuration for probot-stale - https://github.com/probot/stale
# Number of days of inactivity before an Issue or Pull Request becomes stale
daysUntilStale: 90
# Number of days of inactivity before an Issue or Pull Request with the stale label is closed.
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
daysUntilClose: 30
# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled)
onlyLabels: []
# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
exemptLabels:
- pinned
- security
- planned
# Set to true to ignore issues in a project (defaults to false)
exemptProjects: false
# Set to true to ignore issues in a milestone (defaults to false)
exemptMilestones: false
# Set to true to ignore issues with an assignee (defaults to false)
exemptAssignees: false
# Label to use when marking as stale
staleLabel: stale
# Limit the number of actions per hour, from 1-30. Default is 30
limitPerRun: 30
pulls:
markComment: |-
This pull request has been marked 'stale' due to lack of recent activity. If there is no further activity, the PR will be closed in another 30 days. Thank you for your contribution!
Please read [this blog post](https://www.jeffgeerling.com/blog/2020/enabling-stale-issue-bot-on-my-github-repositories) to see the reasons why I mark pull requests as stale.
unmarkComment: >-
This pull request is no longer marked for closure.
closeComment: >-
This pull request has been closed due to inactivity. If you feel this is in error, please reopen the pull request or file a new PR with the relevant details.
issues:
markComment: |-
This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!
Please read [this blog post](https://www.jeffgeerling.com/blog/2020/enabling-stale-issue-bot-on-my-github-repositories) to see the reasons why I mark issues as stale.
unmarkComment: >-
This issue is no longer marked for closure.
closeComment: >-
This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.

View File

@ -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.

View File

@ -28,24 +28,32 @@ You can control whether the package is installed, uninstalled, or at the latest
Variables to control the state of the `docker` service, and whether it should start on boot. If you're installing Docker inside a Docker container without systemd or sysvinit, you should set these to `stopped` and set the enabled variable to `no`. Variables to control the state of the `docker` service, and whether it should start on boot. If you're installing Docker inside a Docker container without systemd or sysvinit, you should set these to `stopped` and set the enabled variable to `no`.
docker_install_compose: true docker_install_compose: true
docker_compose_version: "1.22.0" docker_compose_version: "1.25.4"
docker_compose_path: /usr/local/bin/docker-compose docker_compose_path: /usr/local/bin/docker-compose
Docker Compose installation options. Docker Compose installation options.
docker_apt_release_channel: stable docker_apt_release_channel: stable
docker_apt_arch: amd64 docker_apt_arch: amd64
docker_apt_repository: "deb [arch={{ docker_apt_arch }}] https://download.docker.com/linux/{{ ansible_distribution|lower }} {{ ansible_distribution_release }} {{ docker_apt_release_channel }}" docker_apt_repository: "deb [arch={{ docker_apt_arch }}] https://download.docker.com/linux/{{ 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: https://download.docker.com/linux/{{ ansible_distribution | lower }}/gpg
(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.
You can change `docker_apt_gpg_key` to a different url if you are behind a firewall or provide a trustworthy mirror.
Usually in combination with changing `docker_apt_repository` as well.
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'
docker_yum_gpg_key: https://download.docker.com/linux/centos/gpg
(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`.
You can change `docker_yum_gpg_key` to a different url if you are behind a firewall or provide a trustworthy mirror.
Usually in combination with changing `docker_yum_repository` as well.
docker_users: docker_users:
- user1 - user1
- user2 - user2

View File

@ -11,19 +11,21 @@ docker_restart_handler_state: restarted
# Docker Compose options. # Docker Compose options.
docker_install_compose: true docker_install_compose: true
docker_compose_version: "1.22.0" docker_compose_version: "1.25.4"
docker_compose_path: /usr/local/bin/docker-compose docker_compose_path: /usr/local/bin/docker-compose
# Used only for Debian/Ubuntu. Switch 'stable' to 'edge' if needed. # Used only for Debian/Ubuntu. Switch 'stable' to 'edge' if needed.
docker_apt_release_channel: stable docker_apt_release_channel: stable
docker_apt_arch: amd64 docker_apt_arch: amd64
docker_apt_repository: "deb [arch={{ docker_apt_arch }}] https://download.docker.com/linux/{{ ansible_distribution|lower }} {{ ansible_distribution_release }} {{ docker_apt_release_channel }}" docker_apt_repository: "deb [arch={{ docker_apt_arch }}] https://download.docker.com/linux/{{ 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: https://download.docker.com/linux/{{ ansible_distribution | lower }}/gpg
# 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'
docker_yum_gpg_key: https://download.docker.com/linux/centos/gpg
# 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: []

View File

@ -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:

View File

@ -3,10 +3,10 @@ dependency:
name: galaxy name: galaxy
driver: driver:
name: docker name: docker
lint: lint: |
name: yamllint set -e
options: yamllint .
config-file: molecule/default/yaml-lint.yml ansible-lint
platforms: platforms:
- name: instance - name: instance
image: "geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible:latest" image: "geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible:latest"
@ -17,13 +17,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

View File

@ -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

View File

@ -12,10 +12,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'
- import_tasks: proxies.yml - import_tasks: proxies.yml
- name: Ensure Docker is started and enabled at boot. - name: Ensure Docker is started and enabled at boot.
@ -28,7 +24,7 @@
meta: flush_handlers meta: flush_handlers
- include_tasks: docker-compose.yml - include_tasks: docker-compose.yml
when: docker_install_compose when: docker_install_compose | bool
- include_tasks: docker-users.yml - include_tasks: docker-users.yml
when: docker_users when: docker_users | length > 0

View File

@ -11,23 +11,24 @@
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.
apt_key: apt_key:
url: https://download.docker.com/linux/ubuntu/gpg url: "{{ docker_apt_gpg_key }}"
id: 9DC858229FC7DD38854AE2D88D81803C0EBFCD88 id: 9DC858229FC7DD38854AE2D88D81803C0EBFCD88
state: present state: present
register: add_repository_key register: add_repository_key
ignore_errors: "{{ docker_apt_ignore_key_error }}" ignore_errors: "{{ docker_apt_ignore_key_error }}"
- name: Ensure curl is present (on older systems without SNI). - name: Ensure curl is present (older systems without SNI).
get_url: get_url:
url: https://download.docker.com/linux/ubuntu/gpg url: {{ docker_apt_gpg_key }}
dest: /tmp/docker-repo-key dest: /tmp/docker-repo-key
when: add_repository_key is failed when: add_repository_key is failed
- name: Add Docker apt key (alternative for older systems without SNI). - name: Add Docker apt key (older systems without SNI).
become: true become: true
command: apt-key add /tmp/docker-repo-key command: apt-key add /tmp/docker-repo-key
args: args:

View File

@ -9,7 +9,7 @@
- name: Add Docker GPG key. - name: Add Docker GPG key.
rpm_key: rpm_key:
key: https://download.docker.com/linux/centos/gpg key: "{{ docker_yum_gpg_key }}"
state: present state: present
- name: Add Docker repository. - name: Add Docker repository.
@ -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

View File

@ -1,3 +0,0 @@
# {{ ansible_managed }}
[Service]
ExecStartPre=