ansible/roles/docker/tasks/setup_repo_linux_mint.yml

11 lines
564 B
YAML

---
- name: Set Ubuntu codename for Linux Mint
set_fact:
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)
apt_repository:
repo: "deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu {{ ubuntu_codename }} stable"
state: present
update_cache: yes