mirror of
https://github.com/davestephens/ansible-nas
synced 2024-12-28 20:43:11 +00:00
3da19e5708
* Rejig of playbook to load roles from ansible-galaxy * Remove ansible-nas role and move tasks to tasks directory * Add InfluxDB/Telegraf/Grafana for monitoring & dashboards * Automatically configure InfluxDB as a datasource in Grafana * Switch to ZFS Docker driver * Add note about switching to overlay2 Docker driver if required
34 lines
No EOL
620 B
YAML
34 lines
No EOL
620 B
YAML
---
|
|
- name: install pip
|
|
apt:
|
|
name: python-pip
|
|
state: present
|
|
|
|
- name: 'Install docker-py'
|
|
pip:
|
|
name: docker-py
|
|
state: present
|
|
|
|
- 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:
|
|
src: docker/daemon.json
|
|
dest: /etc/docker/daemon.json
|
|
register: docker_config
|
|
|
|
- name: restart docker
|
|
service:
|
|
name: docker
|
|
state: restarted
|
|
when: docker_config.changed |