forked from ReinerNippes/nextcloud_on_docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nextdocker.yml
executable file
·38 lines (32 loc) · 1.53 KB
/
nextdocker.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
#!/usr/bin/env ansible-playbook
- name: install nextcloud
hosts: nextcloud
become: true
roles:
- { role: prep_ufw, when: ansible_os_family == "Debian" or ansible_os_family == "Ubuntu" }
- { role: prep_os, when: (state is undefined or 'absent' not in state) }
- { role: prep_docker, when: (state is undefined or 'absent' not in state) }
- docker_container
- { role: nextcloud_config, when: (state is undefined or 'absent' not in state) }
- { role: prep_backup, when: restic_repo != '' }
post_tasks:
- name: We are ready
debug:
msg:
- "Your Nextcloud at https://{{ nextcloud_server_fqdn }} is ready."
- "Login with user: {{ nextcloud_admin }} and password: {{ nextcloud_passwd }} "
- "Other secrets you'll find in the directory {{ nextcloud_credential_store }} "
when: (state is undefined or 'absent' not in state)
- name: We are ready
debug:
msg:
- "Manage your container at https://{{ nextcloud_server_fqdn }}/portainer/"
- "Login with user: admin and password: {{ portainer_passwd }} "
when: (state is undefined or 'absent' not in state) and (portainer_passwd != '')
- name: We are ready
debug:
msg:
- restic backup is configured. Keep your credentials in a safe place.
- RESTIC_REPOSITORY='{{ restic_repo }}'
- RESTIC_PASSWORD='{{ restic_backup_secret }}'
when: (state is undefined or 'absent' not in state) and (restic_repo != '')