ansible-nas/tasks/docker.yml

48 lines
902 B
YAML
Raw Normal View History

2017-08-28 15:31:54 +00:00
---
- name: install python3-pip
apt:
name: python3-pip
state: present
register: result
until: result is succeeded
2017-08-28 15:31:54 +00:00
2020-01-22 22:59:16 +00:00
- name: 'Remove docker-py python module'
pip:
name: docker-py
state: absent
register: result
until: result is succeeded
- name: 'Install docker python module'
2017-08-28 15:31:54 +00:00
pip:
name: docker
2017-08-28 15:31:54 +00:00
state: present
2018-12-23 16:50:20 +00:00
register: result
until: result is succeeded
2017-08-28 15:31:54 +00:00
- name: create docker home
file:
path: "{{ docker_home }}"
mode: 0755
state: directory
- name: add user account to docker group
user:
name: "{{ ansible_nas_user }}"
groups: docker
2017-08-28 15:31:54 +00:00
append: yes
- name: update docker home from install default
template:
src: docker/daemon.json
2017-08-28 15:31:54 +00:00
dest: /etc/docker/daemon.json
register: docker_config
- name: restart docker
service:
name: docker
state: restarted
when: docker_config.changed
tags:
- skip_ansible_lint