ansible/roles/docker/tasks/setup_repo_linux_mint.yml

15 lines
644 B
YAML

---
- name: Set Ubuntu codename for Linux Mint
ansible.builtin.set_fact:
docker_ubuntu_codename: >
{{ 'jammy' if ansible_distribution_version is version('22', '>=') else
'focal' if ansible_distribution_version is version('21', '>=') else
'focal' if ansible_distribution_version is version('20', '>=') else
'bionic' }}
- name: Add Docker repository for Linux Mint (using Ubuntu base)
ansible.builtin.apt_repository:
repo: "deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu {{ docker_ubuntu_codename }} stable"
state: present
update_cache: true