first concept for apps

main
n0emis 3 years ago
parent 08d2950276
commit 93a4f4a99a
Signed by: n0emis
GPG Key ID: 00FAF748B777CF10

@ -22,3 +22,5 @@ nextcloud_config: []
# nextcloud_config: # nextcloud_config:
# - key: foobar # - key: foobar
# value: baz # value: baz
nextcloud_apps: []

@ -63,7 +63,23 @@
chdir: "{{ nextcloud_install_directory }}" chdir: "{{ nextcloud_install_directory }}"
loop: "{{ nextcloud_config }}" loop: "{{ nextcloud_config }}"
# TODO: install apps # TODO: improve this!!! this is bad! (but it works)
- name: Install/Remove nextcloud apps
become_user: "{{ nextcloud_user }}"
command: "php occ app:{% if item.state | default('present') != 'absent' and item.state | default('present') != 'disabled' %}install{% elif item.state == 'disabled' %}disable{% else %}remove{% endif %} {{ item.name | default(item) }}"
args:
chdir: "{{ nextcloud_install_directory }}"
ignore_errors: yes
loop: "{{ nextcloud_apps }}"
- name: Make sure nextcloud apps are enabled
become_user: "{{ nextcloud_user }}"
command: "php occ app:enable {{ item.name | default(item) }}"
args:
chdir: "{{ nextcloud_install_directory }}"
ignore_errors: yes
when: item.state | default('present') != 'absent' and item.state | default('present')
loop: "{{ nextcloud_apps }}"
- name: Put nextcloud into maintenance mode - name: Put nextcloud into maintenance mode
become: yes become: yes

Loading…
Cancel
Save