mirror of
https://github.com/davestephens/ansible-nas
synced 2024-11-15 00:17:10 +00:00
47 lines
902 B
YAML
47 lines
902 B
YAML
---
|
|
- name: install python3-pip
|
|
apt:
|
|
name: python3-pip
|
|
state: present
|
|
register: result
|
|
until: result is succeeded
|
|
|
|
- name: 'Remove docker-py python module'
|
|
pip:
|
|
name: docker-py
|
|
state: absent
|
|
register: result
|
|
until: result is succeeded
|
|
|
|
- name: 'Install docker python module'
|
|
pip:
|
|
name: docker
|
|
state: present
|
|
register: result
|
|
until: result is succeeded
|
|
|
|
- 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
|
|
append: yes
|
|
|
|
- name: update docker home from install default
|
|
template:
|
|
src: docker/daemon.json
|
|
dest: /etc/docker/daemon.json
|
|
register: docker_config
|
|
|
|
- name: restart docker
|
|
service:
|
|
name: docker
|
|
state: restarted
|
|
when: docker_config.changed
|
|
tags:
|
|
- skip_ansible_lint
|