Remove docker-ee support

This commit is contained in:
danielewood 2022-11-10 13:16:16 -07:00
parent 9154e3bf75
commit 7f20be3a8e
3 changed files with 17 additions and 22 deletions

View File

@ -12,18 +12,15 @@ None.
Available variables are listed below, along with default values (see `defaults/main.yml`): Available variables are listed below, along with default values (see `defaults/main.yml`):
# Edition can be one of: 'ce' (Community Edition) or 'ee' (Enterprise Edition).
docker_edition: 'ce'
docker_packages: docker_packages:
- "docker-{{ docker_edition }}" - "docker-ce"
- "docker-{{ docker_edition }}-cli" - "docker-ce-cli"
- "docker-{{ docker_edition }}-rootless-extras" - "docker-ce-rootless-extras"
docker_packages_state: present docker_packages_state: present
The `docker_edition` should be either `ce` (Community Edition) or `ee` (Enterprise Edition).
You can also specify a specific version of Docker to install using the distribution-specific format: You can also specify a specific version of Docker to install using the distribution-specific format:
Red Hat/CentOS: `docker-{{ docker_edition }}-<VERSION>` (Note: you have to add this to all packages); Red Hat/CentOS: `docker-ce-<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-ce=<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_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).
@ -62,7 +59,7 @@ The main Docker repo URL, common between Debian and RHEL systems.
You can change `docker_apt_gpg_key` to a different url if you are behind a firewall or provide a trustworthy mirror. 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. Usually in combination with changing `docker_apt_repository` as well.
docker_yum_repo_url: "{{ docker_repo_url }}/{{ (ansible_distribution == 'Fedora') | ternary('fedora','centos') }}/docker-{{ docker_edition }}.repo"docker_edition }}.repo docker_yum_repo_url: "{{ docker_repo_url }}/{{ (ansible_distribution == 'Fedora') | ternary('fedora','centos') }}/docker-ce.repo"
docker_yum_repo_enable_nightly: '0' docker_yum_repo_enable_nightly: '0'
docker_yum_repo_enable_test: '0' docker_yum_repo_enable_test: '0'
docker_yum_gpg_key: "{{ docker_repo_url }}/centos/gpg" docker_yum_gpg_key: "{{ docker_repo_url }}/centos/gpg"
@ -119,7 +116,7 @@ MIT / BSD
## Sponsors ## Sponsors
* [We Manage](https://we-manage.de): Helping start-ups and grown-ups scaling their infrastructure in a sustainable way. - [We Manage](https://we-manage.de): Helping start-ups and grown-ups scaling their infrastructure in a sustainable way.
The above sponsor(s) are supporting Jeff Geerling on [GitHub Sponsors](https://github.com/sponsors/geerlingguy). You can sponsor Jeff's work too, to help him continue improving these Ansible open source projects! The above sponsor(s) are supporting Jeff Geerling on [GitHub Sponsors](https://github.com/sponsors/geerlingguy). You can sponsor Jeff's work too, to help him continue improving these Ansible open source projects!

View File

@ -1,10 +1,8 @@
--- ---
# Edition can be one of: 'ce' (Community Edition) or 'ee' (Enterprise Edition).
docker_edition: 'ce'
docker_packages: docker_packages:
- "docker-{{ docker_edition }}" - "docker-ce"
- "docker-{{ docker_edition }}-cli" - "docker-ce-cli"
- "docker-{{ docker_edition }}-rootless-extras" - "docker-ce-rootless-extras"
- "containerd.io" - "containerd.io"
docker_packages_state: present docker_packages_state: present
@ -37,7 +35,7 @@ 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"
# Used only for RedHat/CentOS/Fedora. # Used only for RedHat/CentOS/Fedora.
docker_yum_repo_url: "{{ docker_repo_url }}/{{ (ansible_distribution == 'Fedora') | ternary('fedora','centos') }}/docker-{{ docker_edition }}.repo" docker_yum_repo_url: "{{ docker_repo_url }}/{{ (ansible_distribution == 'Fedora') | ternary('fedora','centos') }}/docker-ce.repo"
docker_yum_repo_enable_nightly: '0' docker_yum_repo_enable_nightly: '0'
docker_yum_repo_enable_test: '0' docker_yum_repo_enable_test: '0'
docker_yum_gpg_key: "{{ docker_repo_url }}/centos/gpg" docker_yum_gpg_key: "{{ docker_repo_url }}/centos/gpg"

View File

@ -15,15 +15,15 @@
- name: Add Docker repository. - name: Add Docker repository.
get_url: get_url:
url: "{{ docker_yum_repo_url }}" url: "{{ docker_yum_repo_url }}"
dest: '/etc/yum.repos.d/docker-{{ docker_edition }}.repo' dest: '/etc/yum.repos.d/docker-ce.repo'
owner: root owner: root
group: root group: root
mode: 0644 mode: 0644
- name: Configure Docker Nightly repo. - name: Configure Docker Nightly repo.
ini_file: ini_file:
dest: '/etc/yum.repos.d/docker-{{ docker_edition }}.repo' dest: '/etc/yum.repos.d/docker-ce.repo'
section: 'docker-{{ docker_edition }}-nightly' section: 'docker-ce-nightly'
option: enabled option: enabled
value: '{{ docker_yum_repo_enable_nightly }}' value: '{{ docker_yum_repo_enable_nightly }}'
mode: 0644 mode: 0644
@ -31,8 +31,8 @@
- name: Configure Docker Test repo. - name: Configure Docker Test repo.
ini_file: ini_file:
dest: '/etc/yum.repos.d/docker-{{ docker_edition }}.repo' dest: '/etc/yum.repos.d/docker-ce.repo'
section: 'docker-{{ docker_edition }}-test' section: 'docker-ce-test'
option: enabled option: enabled
value: '{{ docker_yum_repo_enable_test }}' value: '{{ docker_yum_repo_enable_test }}'
mode: 0644 mode: 0644