add new folder to docker playbook

This commit is contained in:
eneller
2022-03-18 23:00:00 +01:00
parent 845f737d8b
commit b25574d6f2

View File

@@ -2,7 +2,6 @@
- name: Install Docker - name: Install Docker
# 'all' is okay here, because the fail task will force the user to specify a limit on the command line, using -l or --limit # 'all' is okay here, because the fail task will force the user to specify a limit on the command line, using -l or --limit
hosts: all hosts: all
become: true
tasks: tasks:
- name: checking limit arg - name: checking limit arg
fail: fail:
@@ -11,6 +10,7 @@
run_once: true run_once: true
- name: Install required system packages - name: Install required system packages
become: true
apt: apt:
pkg: pkg:
- ca-certificates - ca-certificates
@@ -32,6 +32,7 @@
state: present state: present
- name: Install Docker packages - name: Install Docker packages
become: true
apt: apt:
update_cache: yes update_cache: yes
pkg: pkg:
@@ -45,8 +46,14 @@
- docker-compose - docker-compose
- name: add user to docker group - name: add user to docker group
become: true
user: user:
name: "{{ ansible_user_id }}" name: "{{ ansible_user_id }}"
groups: groups:
- docker - docker
append: yes append: yes
- name: Create docker folder
file:
path: "{{ansible_user_dir}}/docker"
state: directory