Weitere Einrichtungsschritte
This commit is contained in:
parent
db196d0567
commit
78307df9e0
10 changed files with 107 additions and 29 deletions
|
@ -1,12 +1,12 @@
|
|||
---
|
||||
|
||||
- name: "Ensure install dir is present"
|
||||
- name: "NC Verzeichnis prüfen"
|
||||
file:
|
||||
path: "{{ nextcloud_install_path }}"
|
||||
mode: 0755
|
||||
state: directory
|
||||
|
||||
- name: "Download und unarchive Nextcloud"
|
||||
- name: "NC herunterladen und entpacken"
|
||||
unarchive:
|
||||
src: "{{ nextcloud_dl_url }}/{{ nextcloud_version }}.tar.bz2"
|
||||
remote_src: true
|
||||
|
@ -17,7 +17,7 @@
|
|||
group: "{{ common_name }}"
|
||||
mode: 0755
|
||||
|
||||
- name: "Install Nextcloud"
|
||||
- name: "NC Installation"
|
||||
command: >
|
||||
php "{{ nextcloud_install_path }}"/occ maintenance:install --database "mysql"
|
||||
--database-name "{{ nextcloud_mysql_db }}" --database-user "{{ nextcloud_mysql_user }}"
|
||||
|
@ -27,7 +27,7 @@
|
|||
become_user: "{{ common_name }}"
|
||||
changed_when: true
|
||||
|
||||
- name: "Ensure trusted domains are set"
|
||||
- name: "NC trusted domains einrichte"
|
||||
command: 'php {{ nextcloud_install_path }}/occ config:system:set trusted_domains {{ item.0 }} --value "{{ item.1 }}"'
|
||||
become: true
|
||||
become_user: "{{ common_name }}"
|
||||
|
@ -35,16 +35,45 @@
|
|||
with_indexed_items:
|
||||
- '{{ nextcloud_trusted_domains }}'
|
||||
|
||||
- name: "Ensure Apache marco module is loaded"
|
||||
apache2_module:
|
||||
state: present
|
||||
name: macro
|
||||
notify: restart apache
|
||||
- name: "NC cron einrichten"
|
||||
cron:
|
||||
name: "nextcloud {{ nextcloud_domain }}"
|
||||
minute: "*/5"
|
||||
user: "{{ common_name }}"
|
||||
job: "php -f {{ nextcloud_install_path}}/cron.php"
|
||||
cron_file: "nextcloud"
|
||||
|
||||
- name: "Setup Apache site config"
|
||||
lineinfile:
|
||||
path: /etc/apache2/conf-available/nextcloud_sites.conf
|
||||
insertafter: "^Ansbile"
|
||||
line: "Use NCSite {{ nextcloud_domain }} {{ common_name }}"
|
||||
state: present
|
||||
notify: reload apache
|
||||
- name: "NC allgemeie Konfiguration"
|
||||
command: "{{ item }}"
|
||||
become: true
|
||||
become_user: "{{ common_name }}"
|
||||
changed_when: true
|
||||
with_items:
|
||||
- "php {{ nextcloud_install_path }}/occ app:enable encryption"
|
||||
- "php {{ nextcloud_install_path }}/occ encryption:enable"
|
||||
- 'php {{ nextcloud_install_path }}/occ config:system:set memcache.local --value "\\OC\\Memcache\\APCu"'
|
||||
- "php {{ nextcloud_install_path }}/occ background:cron"
|
||||
- 'php {{ nextcloud_install_path }}/occ config:system:set overwrite.cli.url --value https://{{ nextcloud_domain }}'
|
||||
- 'php {{ nextcloud_install_path }}/occ config:system:set htaccess.RewriteBase --value /'
|
||||
|
||||
- name: "NC Mailversand einrichten"
|
||||
blockinfile:
|
||||
path: "{{ nextcloud_config_file }}"
|
||||
insertbefore: '^\);'
|
||||
marker_begin: mailserver
|
||||
block: |2
|
||||
'mail_from_address' => '{{ nextcloud_mail_from }}',
|
||||
'mail_smtpmode' => 'smtp',
|
||||
'mail_sendmailmode' => 'smtp',
|
||||
'mail_domain' => '{{ nextcloud_mail_domain }}',
|
||||
'mail_smtpauthtype' => '{{ nextcloud_smtp_auth_type }}',
|
||||
'mail_smtphost' => '{{ nextcloud_smtp_host }}',
|
||||
'mail_smtpport' => '{{ nextcloud_smtp_port}}',
|
||||
|
||||
- name: "NC trusted proxies eirichten"
|
||||
command: 'php {{ nextcloud_install_path }}/occ config:system:set trusted_proxies {{ item.0 }} --value "{{ item.1 }}"'
|
||||
become: true
|
||||
become_user: "{{ common_name }}"
|
||||
changed_when: true
|
||||
with_indexed_items:
|
||||
- '{{ nextcloud_trusted_proxies }}'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue