Browse Source

first concept for apps

main
n0emis 2 years ago
parent
commit
93a4f4a99a
Signed by: n0emis GPG Key ID: 00FAF748B777CF10
  1. 2
      defaults/main.yml
  2. 18
      tasks/main.yml

2
defaults/main.yml

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

18
tasks/main.yml

@ -63,7 +63,23 @@
chdir: "{{ nextcloud_install_directory }}"
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
become: yes

Loading…
Cancel
Save