Fixed errors in playbook
This commit is contained in:
@ -1,26 +1,34 @@
|
||||
---
|
||||
- name: run installation script
|
||||
ansible.builtin.command:
|
||||
command:
|
||||
chdir: ~/html
|
||||
cmd: php occ maintenance:install --admin-user "{{ nextcloud_admin_user }}" --admin-pass "{{ nextcloud_admin_password }}" --database 'mysql' --database-name "{{ uberspace_user }}_nextcloud" --database-user "{{ uberspace_user }}" --database-pass "{{ mysql_password }}" --data-dir "/home/{{ uberspace_user }}/nextcloud_data"
|
||||
creates: ~/nextcloud_data
|
||||
register: installation
|
||||
- name: set domain as trusted
|
||||
ansible.builtin.command:
|
||||
command:
|
||||
chdir: ~/html
|
||||
cmd: php occ config:system:set trusted_domains 0 --value="{{ domain }}"
|
||||
when: installation.changed
|
||||
- name: set domain as overwrite cli url
|
||||
ansible.builtin.command:
|
||||
command:
|
||||
chdir: ~/html
|
||||
cmd: php occ config:system:set overwrite.cli.url --value="https://{{ domain }}"
|
||||
when: installation.changed
|
||||
- name: create symlinks for logs
|
||||
when: installation.changed
|
||||
block:
|
||||
- name: symlink for nextcloud log
|
||||
ansible.builtin.file:
|
||||
file:
|
||||
path: ~/logs/nextcloud.log
|
||||
src: ~/nextcloud_data/nextcloud.log
|
||||
state: link
|
||||
- name: touch updater.log
|
||||
file:
|
||||
path: ~/nextcloud_data/updater.log
|
||||
state: touch
|
||||
- name: symlink for nextcloud updater log
|
||||
ansible.builtin.file:
|
||||
file:
|
||||
path: ~/logs/nextcloud-updater.log
|
||||
src: ~/nextcloud_data/updater.log
|
||||
state: link
|
||||
|
||||
Reference in New Issue
Block a user