infrastructure/ansible/roles/docker/tasks/setup-docker.yml
Jake Howard be068a774a
Add my user to dockeruser group
Makes debugging things so much easier!
2020-04-02 09:05:32 +01:00

30 lines
643 B
YAML

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