diff options
| author | admin | 2024-09-19 10:15:02 +0200 |
|---|---|---|
| committer | admin | 2024-09-19 10:15:02 +0200 |
| commit | d7041c181036632e8df44fa61412237db68f5864 (patch) | |
| tree | edb7128500b1c4ed43d82f5dc50f4ca7babfc4d2 /roles/nextcloud/tasks/main.yml | |
| parent | e7d97e709c6f6d98f3619daa37856312a6ab5f09 (diff) | |
| download | ansible-d7041c181036632e8df44fa61412237db68f5864.tar.gz | |
first support for nextcloud (incomplete)
Diffstat (limited to 'roles/nextcloud/tasks/main.yml')
| -rw-r--r-- | roles/nextcloud/tasks/main.yml | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/roles/nextcloud/tasks/main.yml b/roles/nextcloud/tasks/main.yml new file mode 100644 index 0000000..485f8f1 --- /dev/null +++ b/roles/nextcloud/tasks/main.yml @@ -0,0 +1,26 @@ +- name: Check Nextcloud installed + ansible.builtin.stat: + path: "{{ nextcloud_webroot }}/index.php" + register: nc_nextcloud_installed + +- name: Downloading Nextcloud + ansible.builtin.include_tasks: download.yml + when: not nc_nextcloud_installed.stat.exists + +- name: Check Nextcloud configuration exists. + ansible.builtin.stat: + path: "{{ nextcloud_webroot }}/config/config.php" + register: nc_nextcloud_conf + +- name: Check Nextcloud is configured + ansible.builtin.command: grep -q "{{ nextcloud_trusted_domain | first }}" {{ nextcloud_webroot }}/config/config.php + failed_when: false + changed_when: false + register: nc_nextcloud_configured + when: nc_nextcloud_conf.stat.exists + +- name: Nextcloud installation + ansible.builtin.include_tasks: installation.yml + when: | + (not nc_nextcloud_conf.stat.exists) or + (nc_nextcloud_configured.rc is defined and nc_nextcloud_configured.rc != 0) |
