mirror of
https://github.com/geerlingguy/ansible-role-docker.git
synced 2025-03-06 00:16:38 +01:00
Update deb822 condition and variable name
This commit is contained in:
parent
de0ec22581
commit
d3e340b976
@ -77,10 +77,10 @@ Controls whether this role will add the official Docker repository. Set to `fals
|
||||
|
||||
For any instance running Ubuntu 24.04 or later, the Docker repository source file will be in `deb822` format by default.
|
||||
|
||||
This behavior can be modified using the `docker_deb822_format` variable. For example, if the one-line format is preferred, set the variable as follows:
|
||||
This behavior can be modified using the `docker_apt_deb822_format` variable. For example, if the one-line format is preferred, set the variable as follows:
|
||||
|
||||
```yaml
|
||||
docker_deb822_format: false
|
||||
docker_apt_deb822_format: false
|
||||
```
|
||||
|
||||
When set to `true`, the `deb822` format will be used for all Debian-based installations. Note that enabling this will also remove any existing `docker.list` file and install `python3-debian`.
|
||||
|
@ -1,11 +1,11 @@
|
||||
---
|
||||
- name: Check if deb822 format should be used and save it as a fact
|
||||
vars:
|
||||
is_ubuntu2404_or_greater: >-
|
||||
{{ ansible_distribution == "Ubuntu" and ansible_distribution_version is version('24.04', '>=') }}
|
||||
is_ubuntu2304_or_greater: "{{ ansible_distribution == 'Ubuntu' and ansible_distribution_version is version('23.04', '>=') }}"
|
||||
is_debian12_or_greater: "{{ ansible_distribution == 'Debian' and ansible_distribution_version is version('12', '>=') }}"
|
||||
is_deb822_preferred: "{{ is_ubuntu2304_or_greater or is_debian12_or_greater }}"
|
||||
ansible.builtin.set_fact:
|
||||
docker_use_deb822_format: >-
|
||||
{{ docker_deb822_format | default(is_ubuntu2404_or_greater) }}
|
||||
docker_use_deb822_format: "{{ docker_apt_deb822_format | default(is_deb822_preferred) }}"
|
||||
|
||||
- name: Ensure apt key is not present in trusted.gpg.d
|
||||
ansible.builtin.file:
|
||||
|
Loading…
Reference in New Issue
Block a user