infrastructure/ansible/roles/docker/tasks/setup-docker.yml

25 lines
530 B
YAML

- name: Install docker-compose
apt:
name: "docker-compose"
become: true
become_user: root
- name: Create docker user
user:
name: "{{ docker_user.name }}"
uid: "{{ docker_user.id }}"
group: "{{ docker_user.name }}"
create_home: false
- name: Clean up docker containers
cron:
name: clean up docker containers
special_time: weekly
job: "docker system prune"
- name: Install util scripts
copy:
src: ./files/docker-utils
dest: "{{ home }}"
mode: 0755
directory_mode: 0755