From ab74829169de6f437231977e41455dcdc759efc5 Mon Sep 17 00:00:00 2001 From: Felix Stupp Date: Fri, 6 Nov 2020 15:40:17 +0000 Subject: [PATCH] server/nextcloud: Fixed using command module - Added quote filter to import_config_file and system_user - Split command for enabling/disabling addons --- roles/server/nextcloud/tasks/main.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/roles/server/nextcloud/tasks/main.yml b/roles/server/nextcloud/tasks/main.yml index 4c9c672..7cbe569 100644 --- a/roles/server/nextcloud/tasks/main.yml +++ b/roles/server/nextcloud/tasks/main.yml @@ -84,7 +84,7 @@ command: >- /usr/bin/php occ config:import - {{ import_config_file }} + {{ import_config_file | quote }} args: chdir: "{{ nextcloud_installation_directory }}" creates: "{{ nextcloud_config }}" @@ -94,7 +94,10 @@ - name: Install Nextcloud apps become_user: "{{ system_user }}" - command: "/usr/bin/php occ app:install {{ item | quote }}" + command: >- + /usr/bin/php occ + app:install + {{ item | quote }} args: chdir: "{{ nextcloud_installation_directory }}" register: nextcloud_apps_install_results @@ -108,7 +111,10 @@ - name: Disable some Nextcloud apps become_user: "{{ system_user }}" - command: "/usr/bin/php occ app:disable {{ item | quote }}" + command: >- + /usr/bin/php occ + app:disable + {{ item | quote }} args: chdir: "{{ nextcloud_installation_directory }}" register: nextcloud_apps_install_results @@ -123,7 +129,7 @@ name: "nextcloud cron for {{ domain }}" minute: "*/5" job: >- - sudo -u {{ system_user }} + sudo -u {{ system_user | quote }} /usr/bin/php --define apc.enable_cli=1 --file {{ nextcloud_installation_directory | quote }}/cron.php