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,52 +1,62 @@
|
|||
---
|
||||
- name: "Configuration | Richte trusted domains ein | {{ instance.name }}"
|
||||
ansible.builtin.command: 'php {{ nextcloud_install_path }}/occ config:system:set trusted_domains {{ item.0 }} --value "{{ item.1 }}"'
|
||||
- name: "Configuration | Setze Variable"
|
||||
ansible.builtin.set_fact:
|
||||
nextcloud_install_path: "{{ nextcloud_root }}/{{ instances.name }}"
|
||||
|
||||
- name: "Configuration | Richte trusted domains ein | {{ instances.name }}"
|
||||
ansible.builtin.command:
|
||||
cmd: 'php occ config:system:set trusted_domains {{ item.0 }} --value "{{ item.1 }}"'
|
||||
chdir: "{{ nextcloud_install_path }}"
|
||||
become: true
|
||||
become_user: "{{ instance.user }}"
|
||||
become_user: "{{ instances.user }}"
|
||||
changed_when: true
|
||||
with_indexed_items:
|
||||
- '{{ nextcloud.trusted_domains | default(instance.name) }}'
|
||||
- '{{ instances.config.trusted_domains }}'
|
||||
|
||||
- name: "Configuration | Richte cron-Job ein | {{ instance.name }}"
|
||||
- name: "Configuration | Richte cron-Job ein | {{ instances.name }}"
|
||||
ansible.builtin.cron:
|
||||
name: "nextcloud {{ instance.name }}"
|
||||
name: "nextcloud {{ instances.name }}"
|
||||
minute: "*/5"
|
||||
user: "{{ instance.user }}"
|
||||
job: "php -f {{ nextcloud_install_path}}/cron.php"
|
||||
user: "{{ instances.user }}"
|
||||
job: "php -f {{ nextcloud_install_path }}/cron.php"
|
||||
cron_file: "nextcloud"
|
||||
|
||||
- name: "Configuration | Richte allgemeie Konfiguration ein | {{ instance.name }}"
|
||||
ansible.builtin.command: "{{ item }}"
|
||||
- name: "Configuration | Richte allgemeie Konfiguration ein | {{ instances.name }}"
|
||||
ansible.builtin.command:
|
||||
cmd: "{{ commands }}"
|
||||
chdir: "{{ nextcloud_install_path }}"
|
||||
become: true
|
||||
become_user: "{{ instance.user }}"
|
||||
become_user: "{{ instances.user }}"
|
||||
changed_when: true
|
||||
with_items:
|
||||
- 'php {{ nextcloud_install_path }}/occ config:system:set memcache.local --value "\\OC\\Memcache\\APCu"'
|
||||
- 'php {{ nextcloud_install_path }}/occ config:system:set memcache.distributed --value "\OC\Memcache\Redis"'
|
||||
- "php {{ nextcloud_install_path }}/occ background:cron"
|
||||
- 'php {{ nextcloud_install_path }}/occ config:system:set overwrite.cli.url --value https://{{ instance.name }}'
|
||||
- 'php {{ nextcloud_install_path }}/occ config:system:set htaccess.RewriteBase --value /'
|
||||
- 'php {{ nextcloud_install_path }}/occ maintenance:update:htaccess'
|
||||
- 'php {{ nextcloud_install_path }}/occ config:system:set default_language --value "de"'
|
||||
- 'php {{ nextcloud_install_path }}/occ config:system:set default_phone_region --value "DE"'
|
||||
- 'php {{ nextcloud_install_path }}/occ config:system:set loglevel --value "1"'
|
||||
loop:
|
||||
- 'php occ config:system:set memcache.local --value "\\OC\\Memcache\\APCu"'
|
||||
- 'php occ config:system:set memcache.distributed --value "\OC\Memcache\Redis"'
|
||||
- "php occ background:cron"
|
||||
- 'php occ config:system:set overwrite.cli.url --value https://{{ instances.name }}'
|
||||
- 'php occ config:system:set htaccess.RewriteBase --value /'
|
||||
- 'php occ maintenance:update:htaccess'
|
||||
- 'php occ config:system:set default_language --value "de"'
|
||||
- 'php occ config:system:set default_phone_region --value "DE"'
|
||||
- 'php occ config:system:set loglevel --value "1"'
|
||||
loop_control:
|
||||
loop_var: commands
|
||||
|
||||
- name: "Configuration | Richte Mailversand ein | {{ instance.name }}"
|
||||
- name: "Configuration | Richte Mailversand ein | {{ instances.name }}"
|
||||
ansible.builtin.blockinfile:
|
||||
path: "{{ nextcloud_config_file }}"
|
||||
insertbefore: '^\);'
|
||||
marker: "// {mark} ANSIBLE MANAGED BLOCK"
|
||||
marker_begin: mailserver
|
||||
block: |2
|
||||
'mail_from_address' => '{{ nextcloud.mail_from }}',
|
||||
'mail_from_address' => '{{ instances.config.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 }}',
|
||||
'mail_domain' => '{{ instances.config.mail_domain }}',
|
||||
'mail_smtpauthtype' => '{{ instances.config.smtp_auth_type }}',
|
||||
'mail_smtphost' => '{{ instances.config.smtp_host }}',
|
||||
'mail_smtpport' => '{{ instances.config.smtp_port }}',
|
||||
|
||||
- name: "Configuration | Richte Filelocking ein | {{ instance.name }}"
|
||||
- name: "Configuration | Richte Filelocking ein | {{ instances.name }}"
|
||||
ansible.builtin.blockinfile:
|
||||
path: "{{ nextcloud_config_file }}"
|
||||
insertbefore: '^\);'
|
||||
|
@ -62,15 +72,17 @@
|
|||
'timeout' => 1.5,
|
||||
),
|
||||
|
||||
- name: "Configuration | Richte trusted proxies ein | {{ instance.name }}"
|
||||
ansible.builtin.command: 'php {{ nextcloud_install_path }}/occ config:system:set trusted_proxies {{ item.0 }} --value "{{ item.1 }}"'
|
||||
- name: "Configuration | Richte trusted proxies ein | {{ instances.name }}"
|
||||
ansible.builtin.command:
|
||||
cmd: 'php occ config:system:set trusted_proxies {{ item.0 }} --value "{{ item.1 }}"'
|
||||
chdir: "{{ nextcloud_install_path }}"
|
||||
become: true
|
||||
become_user: "{{ instance.user }}"
|
||||
become_user: "{{ instances.user }}"
|
||||
changed_when: true
|
||||
with_indexed_items:
|
||||
- "{{ nextcloud.trusted_proxies }}"
|
||||
- "{{ instances.config.trusted_proxies }}"
|
||||
|
||||
- name: "Configuration | Richte Logging ein | {{ instance.name }}"
|
||||
- name: "Configuration | Richte Logging ein | {{ instances.name }}"
|
||||
ansible.builtin.blockinfile:
|
||||
path: "{{ nextcloud_config_file }}"
|
||||
insertbefore: '^\);'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue