From 68108b347a66497d4fce58ba17cbf88250e77d94 Mon Sep 17 00:00:00 2001 From: Marc Crebassa Date: Thu, 12 Sep 2024 08:53:30 +0200 Subject: [PATCH] fix trailling space in args make the config create an array instead of string Signed-off-by: Marc Crebassa --- .../roles/test_install_nextcloud/tasks/test_config_php.yml | 2 +- roles/install_nextcloud/README.md | 4 ++-- roles/install_nextcloud/defaults/main.yml | 2 +- roles/install_nextcloud/tasks/nc_installation.yml | 6 ++---- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/molecule/default/roles/test_install_nextcloud/tasks/test_config_php.yml b/molecule/default/roles/test_install_nextcloud/tasks/test_config_php.yml index d8093d61..ef0ae2c7 100644 --- a/molecule/default/roles/test_install_nextcloud/tasks/test_config_php.yml +++ b/molecule/default/roles/test_install_nextcloud/tasks/test_config_php.yml @@ -1,7 +1,7 @@ --- - name: "Get the config.php content" become: true - nextcloud.admon.run_occ: + nextcloud.admin.run_occ: nextcloud_path: "{{ nextcloud_webroot }}" command: config:list register: _config_php diff --git a/roles/install_nextcloud/README.md b/roles/install_nextcloud/README.md index 90a32b7d..a84f6dd1 100644 --- a/roles/install_nextcloud/README.md +++ b/roles/install_nextcloud/README.md @@ -291,7 +291,7 @@ The port of redis server. Port 0 is for socket use. Default redis port is 6379. ```yaml nextcloud_redis_settings: - - { name: 'redis host', value: '"{{ nextcloud_redis_host }}"' } + - { name: 'redis host', value: "{{ nextcloud_redis_host }}" } - { name: 'redis port', value: "{{ nextcloud_redis_port }}" } - { name: 'memcache.locking', value: '\OC\Memcache\Redis' } ``` @@ -685,4 +685,4 @@ We encourage you to contribute to this role! Please check out the ## License -BSD +BSD diff --git a/roles/install_nextcloud/defaults/main.yml b/roles/install_nextcloud/defaults/main.yml index e41418fe..9e180ae2 100644 --- a/roles/install_nextcloud/defaults/main.yml +++ b/roles/install_nextcloud/defaults/main.yml @@ -62,7 +62,7 @@ nextcloud_redis_host: '/var/run/redis/redis.sock' nextcloud_redis_port: 0 nextcloud_redis_settings: - - { name: 'redis host', value: '"{{ nextcloud_redis_host }}"' } + - { name: 'redis host', value: "{{ nextcloud_redis_host }}" } - { name: 'redis port', value: "{{ nextcloud_redis_port }}" } - { name: 'memcache.locking', value: '\OC\Memcache\Redis' } diff --git a/roles/install_nextcloud/tasks/nc_installation.yml b/roles/install_nextcloud/tasks/nc_installation.yml index 061c8605..71c11f59 100644 --- a/roles/install_nextcloud/tasks/nc_installation.yml +++ b/roles/install_nextcloud/tasks/nc_installation.yml @@ -104,8 +104,7 @@ command: >- config:system:set {{ item.name }} - --value "{{ item.value }}" - {% if item.value | type_debug == 'bool' %}--type=boolean{% endif %} + --value {{ item.value }}{% if item.value | type_debug == 'bool' %} --type=boolean{% endif %} with_items: - "{{ nextcloud_config_settings }}" @@ -115,8 +114,7 @@ nextcloud_path: "{{ nextcloud_webroot }}" command: >- config:system:set {{ item.name }} - --value "{{ item.value }}" - {% if item.value | type_debug == 'bool' %}--type=boolean{% endif %} + --value {{ item.value }}{% if item.value | type_debug == 'bool' %} --type=boolean{% endif %} with_items: - "{{ nextcloud_redis_settings }}" when: (nextcloud_install_redis_server | bool)