Update Nextcloud role to include Hiddenservice tasks
This commit is contained in:
parent
7f42bc9fd2
commit
63eb7d74f7
23 changed files with 282 additions and 244 deletions
|
@ -1,29 +1,50 @@
|
|||
---
|
||||
- name: "nextcloud: {{ instance.name }}: Verzeichnis prüfen"
|
||||
file:
|
||||
path: "{{ nextcloud_install_path }}"
|
||||
mode: 0644
|
||||
state: directory
|
||||
- name: "Nextcloud | Prüfe NC-Installation | {{ item.name }}"
|
||||
ansible.builtin.stat:
|
||||
path: "{{ nextcloud_install_path }}/version.php"
|
||||
register: nc_is_installed
|
||||
check_mode: false
|
||||
changed_when: false
|
||||
|
||||
- name: "nextcloud: {{ instance.name }}: herunterladen und entpacken"
|
||||
unarchive:
|
||||
- name: "Nextcloud | Prüfe NC-Version | {{ item.name }}"
|
||||
ansible.builtin.shell:
|
||||
cmd: php ./occ -V | awk '{print $NF}'
|
||||
chdir: "{{ nextcloud_install_path }}"
|
||||
become: true
|
||||
become_user: "{{ item.user }}"
|
||||
register: nc_installed_version
|
||||
when: nc_is_installed.stat.exists
|
||||
check_mode: false
|
||||
changed_when: false
|
||||
|
||||
- name: "Nextcloud | Prüfe Installationsverzeichnis | {{ item.name }}"
|
||||
ansible.builtin.file:
|
||||
path: "{{ nextcloud_install_path }}"
|
||||
mode: "0644"
|
||||
state: directory
|
||||
when: not nc_is_installed.stat.exists
|
||||
|
||||
- name: "Nextcloud | Lade Archiv herunter | {{ item.name }}"
|
||||
ansible.builtin.unarchive:
|
||||
src: "{{ nextcloud_dl_url }}"
|
||||
remote_src: true
|
||||
extra_opts:
|
||||
- "--strip-components=1"
|
||||
dest: "{{ nextcloud_install_path }}"
|
||||
owner: "{{ instance.user }}"
|
||||
group: "{{ instance.user }}"
|
||||
mode: 0644
|
||||
owner: "{{ item.user }}"
|
||||
group: "{{ item.user }}"
|
||||
mode: "0644"
|
||||
when: not nc_is_installed.stat.exists
|
||||
|
||||
- name: "nextcloud: {{ instance.name }}: Installation"
|
||||
command:
|
||||
- name: "Nextcloud | Führe Installation aus | {{ item.name }}"
|
||||
ansible.builtin.command:
|
||||
cmd: >
|
||||
php occ maintenance:install --database "mysql"
|
||||
--database-name "{{ instance.database }}" --database-user "{{ instance.database }}"
|
||||
--database-name "{{ item.database }}" --database-user "{{ item.database }}"
|
||||
--database-pass "{{ nextcloud_db_password }}" --database-host "{{ database_host }}"
|
||||
--admin-user "{{ nextcloud_admin_user }}" --admin-pass "{{ nextcloud_admin_pw }}"
|
||||
chdir: "{{ nextcloud_install_path }}"
|
||||
become: true
|
||||
become_user: "{{ instance.user }}"
|
||||
become_user: "{{ item.user }}"
|
||||
changed_when: true
|
||||
when: not nc_is_installed.stat.exists
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue