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