-
Notifications
You must be signed in to change notification settings - Fork 0
/
dockerpi.yml
47 lines (42 loc) · 928 Bytes
/
dockerpi.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
---
# Run with ansible-playbook -i inventory/hosts main.yml
- name: Setup Docker pi
hosts: all
remote_user: pi
become: true
become_method: sudo
gather_facts: true
vars_files:
- ./vars/pi-vars.yml
pre_tasks:
- name: Update Apt Cache
ansible.builtin.apt:
update_cache: true
cache_valid_time: 3600
roles:
- docker-pi
- name: Setup nfs-server
hosts: nfs-server
remote_user: pi
become: true
become_method: sudo
gather_facts: true
vars_files:
- ./vars/pi-vars.yml
roles:
- nfs-server-pi
# tasks:
# - name: Reboot nfs-server
# ansible.builtin.reboot:
- name: Setup nfs-clients
hosts: pi , !nfs-server
become: true
become_method: sudo
gather_facts: true
vars_files:
- ./vars/pi-vars.yml
roles:
- nfs-client-pi
# tasks:
# - name: Reboot nfs-clients
# ansible.builtin.reboot: