|
|
|
@ -3,7 +3,7 @@
|
|
|
|
|
- name: Configure system user
|
|
|
|
|
user:
|
|
|
|
|
state: present
|
|
|
|
|
name: "{{ nextcloud_system_user }}"
|
|
|
|
|
name: "{{ system_user }}"
|
|
|
|
|
system: yes
|
|
|
|
|
shell: /bin/false
|
|
|
|
|
create_home: yes
|
|
|
|
@ -137,7 +137,7 @@
|
|
|
|
|
check_mode: no
|
|
|
|
|
|
|
|
|
|
- name: Download Nextcloud
|
|
|
|
|
become_user: "{{ nextcloud_system_user }}"
|
|
|
|
|
become_user: "{{ system_user }}"
|
|
|
|
|
include_tasks: install.yml
|
|
|
|
|
when: not nextcloud_installed.stat.exists
|
|
|
|
|
|
|
|
|
@ -145,12 +145,12 @@
|
|
|
|
|
file:
|
|
|
|
|
state: directory
|
|
|
|
|
path: "{{ nextcloud_data_directory }}"
|
|
|
|
|
owner: "{{ nextcloud_system_user }}"
|
|
|
|
|
group: "{{ nextcloud_system_user }}"
|
|
|
|
|
owner: "{{ system_user }}"
|
|
|
|
|
group: "{{ system_user }}"
|
|
|
|
|
mode: "u=rwx,g=rx"
|
|
|
|
|
|
|
|
|
|
- name: Install Nextcloud
|
|
|
|
|
become_user: "{{ nextcloud_system_user }}"
|
|
|
|
|
become_user: "{{ system_user }}"
|
|
|
|
|
command: >-
|
|
|
|
|
/usr/bin/php occ maintenance:install
|
|
|
|
|
--database mysql
|
|
|
|
@ -166,7 +166,7 @@
|
|
|
|
|
creates: "{{ nextcloud_config }}"
|
|
|
|
|
|
|
|
|
|
- name: Configure Nextcloud default domain
|
|
|
|
|
become_user: "{{ nextcloud_system_user }}"
|
|
|
|
|
become_user: "{{ system_user }}"
|
|
|
|
|
lineinfile:
|
|
|
|
|
backrefs: yes
|
|
|
|
|
path: "{{ nextcloud_config }}"
|
|
|
|
@ -176,7 +176,7 @@
|
|
|
|
|
validate: /usr/bin/php %s
|
|
|
|
|
|
|
|
|
|
- name: Configure Nextcloud default domain for cli
|
|
|
|
|
become_user: "{{ nextcloud_system_user }}"
|
|
|
|
|
become_user: "{{ system_user }}"
|
|
|
|
|
lineinfile:
|
|
|
|
|
backrefs: yes
|
|
|
|
|
path: "{{ nextcloud_config }}"
|
|
|
|
@ -186,7 +186,7 @@
|
|
|
|
|
validate: /usr/bin/php %s
|
|
|
|
|
|
|
|
|
|
- name: Install Nextcloud apps
|
|
|
|
|
become_user: "{{ nextcloud_system_user }}"
|
|
|
|
|
become_user: "{{ system_user }}"
|
|
|
|
|
command: "/usr/bin/php occ app:install {{ item | quote }}"
|
|
|
|
|
args:
|
|
|
|
|
chdir: "{{ nextcloud_installation_directory }}"
|
|
|
|
@ -254,7 +254,7 @@
|
|
|
|
|
- workflowengine
|
|
|
|
|
|
|
|
|
|
- name: Set background job mode to cron
|
|
|
|
|
become_user: "{{ nextcloud_system_user }}"
|
|
|
|
|
become_user: "{{ system_user }}"
|
|
|
|
|
command: /usr/bin/php occ background:cron
|
|
|
|
|
args:
|
|
|
|
|
chdir: "{{ nextcloud_installation_directory }}"
|
|
|
|
@ -263,7 +263,7 @@
|
|
|
|
|
cron:
|
|
|
|
|
name: "nextcloud cron for {{ domain }}"
|
|
|
|
|
minute: "*/5"
|
|
|
|
|
job: "sudo -u {{ nextcloud_system_user }} php -f \"{{ nextcloud_installation_directory }}/cron.php\""
|
|
|
|
|
job: "sudo -u {{ system_user }} php -f \"{{ nextcloud_installation_directory }}/cron.php\""
|
|
|
|
|
|
|
|
|
|
- name: Configure auto backup of nextcloud data directory
|
|
|
|
|
cron:
|
|
|
|
@ -274,7 +274,7 @@
|
|
|
|
|
state: present
|
|
|
|
|
|
|
|
|
|
#- name: Upgrade Nextcloud
|
|
|
|
|
# become_user: "{{ nextcloud_system_user }}"
|
|
|
|
|
# become_user: "{{ system_user }}"
|
|
|
|
|
# command: /usr/bin/php occ upgrade
|
|
|
|
|
# args:
|
|
|
|
|
# chdir: "{{ nextcloud_installation_directory }}"
|
|
|
|
|