235
|
1 |
--- |
|
2 |
|
|
3 |
- name: add scrypted user |
|
4 |
become: yes |
|
5 |
user: name="scrypted" shell="/bin/false" system="yes" create_home="no" groups="docker" |
|
6 |
|
|
7 |
- name: install docker apt packages |
|
8 |
become: yes |
|
9 |
apt: name="docker-ce" |
|
10 |
|
|
11 |
- name: make scrypted dir |
|
12 |
become: yes |
|
13 |
file: |
|
14 |
path: "{{item}}" |
|
15 |
state: "directory" |
|
16 |
owner: "scrypted" |
|
17 |
group: "scrypted" |
|
18 |
mode: "0755" |
|
19 |
loop: |
|
20 |
- "{{scrypted_dir}}" |
|
21 |
- "{{scrypted_dir}}/volume" |
|
22 |
|
|
23 |
- name: configure scrypted docker compose |
|
24 |
become: yes |
|
25 |
template: |
|
26 |
src: "docker-compose.yml.j2" |
|
27 |
dest: "{{scrypted_dir}}/docker-compose.yml" |
|
28 |
owner: "scrypted" |
|
29 |
group: "scrypted" |
|
30 |
mode: "0600" |
|
31 |
|
|
32 |
- name: docker compose pull |
|
33 |
become: yes |
|
34 |
become_user: "scrypted" |
|
35 |
command: "docker compose pull" |
|
36 |
args: |
|
37 |
chdir: "{{scrypted_dir}}" |
|
38 |
|
|
39 |
- name: docker compose |
|
40 |
become: yes |
|
41 |
become_user: "scrypted" |
|
42 |
command: "docker compose up -d" |
|
43 |
args: |
|
44 |
chdir: "{{scrypted_dir}}" |