Update docker task

This commit is contained in:
Przemek Grondek 2022-04-15 00:44:59 +02:00
parent 1d5c60b126
commit 802fb5fa72
2 changed files with 31 additions and 6 deletions

View File

@ -35,3 +35,15 @@
name: "{{ansible_user_id}}"
groups: docker
append: yes
- name: start and enable docker
systemd:
name: docker
state: started
enabled: true
- name: add current user to docker group
user:
name: "{{ ansible_user_id }}"
append: yes
groups: docker

View File

@ -1,7 +1,20 @@
---
- name: install needed packages
become: yes
apt:
update_cache: yes
pkg:
- docker.io
- become: yes
block:
- name: install needed packages
apt:
update_cache: yes
pkg:
- docker.io
- name: start and enable docker
systemd:
name: docker
state: started
enabled: true
- name: add current user to docker group
user:
name: "{{ ansible_user_id }}"
append: yes
groups: docker