Merge pull request 'Set docker apt repo matching the Debian release' (!51) from docker_setup-release into master
Reviewed-on: https://gitea.n39.eu/Netz39_Admin/netz39-infra-ansible/pulls/51 Reviewed-by: Alexander Dahl <alex@netz39.de> Fixes: #721
This commit is contained in:
commit
631f6b0fa7
2 changed files with 10 additions and 4 deletions
|
@ -29,11 +29,15 @@
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: add Docker's APT repository
|
- name: add Docker's APT repository
|
||||||
apt_repository:
|
ansible.builtin.template:
|
||||||
repo: deb https://download.docker.com/linux/debian buster stable
|
src: templates/docker.list.j2
|
||||||
state: present
|
dest: /etc/apt/sources.list.d/docker.list
|
||||||
|
register: apt_repo
|
||||||
|
|
||||||
|
- name: Update package cache
|
||||||
|
ansible.builtin.apt:
|
||||||
update_cache: true
|
update_cache: true
|
||||||
filename: "docker"
|
when: apt_repo.changed
|
||||||
|
|
||||||
- name: install Docker
|
- name: install Docker
|
||||||
package:
|
package:
|
||||||
|
|
2
roles/docker_setup/templates/docker.list.j2
Normal file
2
roles/docker_setup/templates/docker.list.j2
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
deb https://download.docker.com/linux/debian {{ ansible_distribution_release }} stable
|
||||||
|
|
Loading…
Reference in a new issue