]> git.phdru.name Git - ansible.git/commitdiff
Feat(roles/docker): Install Docker (currently Debian-only)
authorOleg Broytman <phd@phdru.name>
Mon, 11 Apr 2022 14:33:27 +0000 (17:33 +0300)
committerOleg Broytman <phd@phdru.name>
Mon, 11 Apr 2022 14:33:27 +0000 (17:33 +0300)
playbooks/roles/docker/README.txt [new file with mode: 0644]
playbooks/roles/docker/tasks/main.yml [new file with mode: 0644]

diff --git a/playbooks/roles/docker/README.txt b/playbooks/roles/docker/README.txt
new file mode 100644 (file)
index 0000000..af417db
--- /dev/null
@@ -0,0 +1 @@
+Install Docker (currently Debian-only from Debian repository).
diff --git a/playbooks/roles/docker/tasks/main.yml b/playbooks/roles/docker/tasks/main.yml
new file mode 100644 (file)
index 0000000..d053f2b
--- /dev/null
@@ -0,0 +1,11 @@
+- name: Install Docker (Debian)
+  become: true
+  apt:
+    autoclean: yes
+    autoremove: yes
+    cache_valid_time: 3600
+    install_recommends: no
+    name: docker.io
+    state: latest
+    update_cache: yes
+  when: ansible_facts.os_family == 'Debian'