2017-08-28 15:31:54 +00:00
|
|
|
---
|
2019-01-05 04:05:41 +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
|
|
|
|
|
|
|
- name: 'Install docker-py'
|
|
|
|
pip:
|
|
|
|
name: docker-py
|
|
|
|
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 }}"
|
|
|
|
group: docker
|
|
|
|
append: yes
|
|
|
|
|
|
|
|
- name: update docker home from install default
|
|
|
|
template:
|
2018-04-08 22:29:25 +00:00
|
|
|
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
|
2018-12-08 22:44:51 +00:00
|
|
|
when: docker_config.changed
|
|
|
|
tags:
|
|
|
|
- skip_ansible_lint
|