Commit 9d02daaf authored by nimrod's avatar nimrod
Browse files

Add owncloud_config (internal variable to hold all of the configuration to be...

Add owncloud_config (internal variable to hold all of the configuration to be set), template to convert to json and changed the tasks to create the json configuration file and use occ to import it.
parent ca5911e4
Loading
Loading
Loading
Loading
+14
Changes for tasks/main.yml: 14 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -41,6 +41,20 @@
  changed_when: '"ownCloud was successfully installed" in owncloud_occ_install.stdout'
  failed_when: "owncloud_occ_install|failed and not 'Command \"maintenance:install\" is not defined' in owncloud_occ_install.stderr"

- name: Generate config json
  template:
    src: config.json.j2
    dest: /var/www/owncloud/config.json
    owner: www-data
    group: www-data
    mode: '0644'

- name: Allow trusted domains (always changes)
  become: yes
  become_user: www-data
  command: /usr/bin/php occ config:import config.json
  args:
   chdir: /var/www/owncloud

- name: Enable mod-ssl in Apache
  with_items:
+1
Changes for templates/config.json.j2: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
{{ owncloud_config|to_nice_json }}
+4
Changes for vars/main.yml: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
---
# vars file for ansible-owncloud

owncloud_config:
  system:
    trusted_domains: "{{ owncloud_trusted_domains }}"