forked from inofix/common-playbooks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup-nextcloud.yml
67 lines (56 loc) · 2.21 KB
/
setup-nextcloud.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#* This playbook installs the Nextcloud/ownCloud service directory and
#* connects it to a database etc.
#* Note: this playbook should be used either from the main install playbook
#* (which resolves its dependencies) or as a shorthand for an already set up
#* system, where the dependencies are already provided.
#* Use '-a' to pass parameters to ansible (as '-e'). See ansible fetch for
#* details.
#* No arguments are mandatory.
- import_playbook: install-php.yml
- hosts: app.nextcloud,app.owncloud,&app.postgresql,&app.php
become: True
roles:
- { role: inofix.yapkg, yapkg__task_group_name: 'the db connector for php', yapkg__list: '{{ os__pkg_name[app__php__pkg_key] }}' }
- import_playbook: install-nextcloud.yml
- import_playbook: install-database-system.yml
- hosts: app.nextcloud,&app.postgresql,&app.php
become: True
roles:
- setup-nextcloud-postgres
- hosts: app.owncloud,&app.postgresql
become: True
vars:
app__nextcloud__archive: '{{ app__owncloud__archive }}'
app__nextcloud__base: '{{ app__owncloud__base }}'
app__nextcloud__checksum: '{{ app__owncloud__checksum }}'
app__nextcloud__db_user: '{{ app__owncloud__db_user }}'
app__nextcloud__db_name: '{{ app__owncloud__db_name }}'
app__nextcloud__download_upstream: '{{ app__owncloud__download_upstream }}'
app__nextcloud__group: '{{ app__owncloud__group }}'
app__nextcloud__home: '{{ app__owncloud__home }}'
app__nextcloud__name: '{{ app__owncloud__name }}'
app__nextcloud__package: '{{ app__owncloud__package }}'
app__nextcloud__version: '{{ app__owncloud__version }}'
app__nextcloud__user: '{{ app__owncloud__user }}'
roles:
- setup-nextcloud-postgres
- hosts: app.nextcloud,&app.php,&app.php.memcache-apcu
become: True
roles:
- setup-nextcloud-memcache
- hosts: app.nextcloud,&app.php,&app.nextcloud.cron
become: True
roles:
- setup-nextcloud-cron
- hosts: app.nextcloud,&app.php,&app.nextcloud.backup
become: True
roles:
- prepare-backup
- setup-nextcloud-backup
# not enabling this yet, as it only tracks 'today'
# it is only useful for human communication and needs
# to be combined with something smarter as
# dpkg --get-selections
#- hosts: all
# roles:
# - track-packages