|
|
|
@ -71,40 +71,29 @@
|
|
|
|
|
chdir: "{{ nextcloud_installation_directory }}"
|
|
|
|
|
creates: "{{ nextcloud_config }}"
|
|
|
|
|
|
|
|
|
|
- name: Configure Nextcloud default domain
|
|
|
|
|
become_user: "{{ system_user }}"
|
|
|
|
|
lineinfile:
|
|
|
|
|
path: "{{ nextcloud_config }}"
|
|
|
|
|
firstmatch: yes
|
|
|
|
|
insertafter: "array \\("
|
|
|
|
|
regexp: "^(\\s*)0 => '([^.]\\.)+[^.]*',$"
|
|
|
|
|
line: " 0 => '{{ domain }}',"
|
|
|
|
|
validate: /usr/bin/php %s
|
|
|
|
|
|
|
|
|
|
- name: Configure Nextcloud default domain for cli
|
|
|
|
|
become_user: "{{ system_user }}"
|
|
|
|
|
lineinfile:
|
|
|
|
|
path: "{{ nextcloud_config }}"
|
|
|
|
|
firstmatch: yes
|
|
|
|
|
insertafter: "'version'"
|
|
|
|
|
regexp: "^(\\s*)'overwrite.cli.url' => '.*',$"
|
|
|
|
|
line: " 'overwrite.cli.url' => 'https://{{ domain }}',"
|
|
|
|
|
validate: /usr/bin/php %s
|
|
|
|
|
- name: Store additional Nextcloud configuration
|
|
|
|
|
copy:
|
|
|
|
|
content: "{{ import_config | to_nice_json }}\n"
|
|
|
|
|
dest: "{{ import_config_file }}"
|
|
|
|
|
owner: "{{ system_user }}"
|
|
|
|
|
group: "{{ system_user }}"
|
|
|
|
|
mode: u=rw,g=r,o=
|
|
|
|
|
register: import_config_file_task
|
|
|
|
|
tags:
|
|
|
|
|
- nextcloud_config
|
|
|
|
|
|
|
|
|
|
- name: Add additional entries to Nextcloud config
|
|
|
|
|
- name: Import additional Nextcloud configuration
|
|
|
|
|
become_user: "{{ system_user }}"
|
|
|
|
|
blockinfile:
|
|
|
|
|
path: "{{ nextcloud_config }}"
|
|
|
|
|
insertbefore: "^\\);"
|
|
|
|
|
block: |
|
|
|
|
|
'memcache.local' => '\\OC\\Memcache\\APCu',
|
|
|
|
|
'memcache.distributed' => '\\OC\\Memcache\\Redis',
|
|
|
|
|
'memcache.locking' => '\\OC\\Memcache\\Redis',
|
|
|
|
|
'redis' => [
|
|
|
|
|
'host' => '{{ redis_socket_path }}',
|
|
|
|
|
'port' => 0,
|
|
|
|
|
],
|
|
|
|
|
validate: /usr/bin/php %s
|
|
|
|
|
command: >-
|
|
|
|
|
/usr/bin/php occ
|
|
|
|
|
config:import
|
|
|
|
|
{{ import_config_file }}
|
|
|
|
|
args:
|
|
|
|
|
chdir: "{{ nextcloud_installation_directory }}"
|
|
|
|
|
creates: "{{ nextcloud_config }}"
|
|
|
|
|
when: import_config_file_task.changed
|
|
|
|
|
tags:
|
|
|
|
|
- nextcloud_config
|
|
|
|
|
|
|
|
|
|
- name: Install Nextcloud apps
|
|
|
|
|
become_user: "{{ system_user }}"
|
|
|
|
|