Commit 1f495ab6 authored by Loïc Dachary's avatar Loïc Dachary

Merge branch 'wip-nextcloud-mail' into 'master'

nextcloud: send mail to the local host instead of postfix-host

Closes #189

See merge request !217
parents 329bff96 5198dc65
Pipeline #622 passed with stage
in 11 minutes and 52 seconds
......@@ -46,21 +46,18 @@
- name: cleanup docker leftovers
shell: docker system prune --force
become: False
- name: docker build apache-cron
shell: |
docker build -t nextcloud:{{ enough_nextcloud_version }}-apache-cron .
args:
chdir: "{{ app_dir }}"
become: False
- name: (re)create nextcloud
shell: |
docker-compose up -d
args:
chdir: "{{ app_dir }}"
become: False
- name: wait for {{ vhost_fqdn }} to be ready
shell: |
......@@ -92,7 +89,6 @@
--admin-user="{{ NEXTCLOUD_ADMIN_USER }}" --admin-pass="{{ NEXTCLOUD_ADMIN_PASS }}"'
args:
chdir: "{{ app_dir }}"
become: False
when: nextcloud_config.rc == 1
# when I/O lags the database may not be ready and retry is necessary
register: nextcloud_install
......@@ -107,14 +103,12 @@
{{ app_sh }} php -f occ config:system:set trusted_domains 1 --value {{ ansible_host }} # for test purposes only
args:
chdir: "{{ app_dir }}"
become: False
- name: occ config:system:set overwriteprotocol --value=https
shell: |
{{ app_sh }} php -f occ config:system:set overwriteprotocol --value=https
args:
chdir: "{{ app_dir }}"
become: False
# cron jobs rely on overwrite.cli.url to set the URL
- name: occ config:system:set config:system:set overwrite.cli.url --value=https://{{ vhost_fqdn }}
......@@ -122,7 +116,6 @@
{{ app_sh }} php -f occ config:system:set overwrite.cli.url --value=https://{{ vhost_fqdn }}
args:
chdir: "{{ app_dir }}"
become: False
# needed when upgrading because it is not done by the upgrade
- name: occ db:add-missing-indices
......@@ -130,7 +123,6 @@
{{ app_sh }} php -f occ db:add-missing-indices
args:
chdir: "{{ app_dir }}"
become: False
# needed when installing 15
- name: occ db:convert-filecache-bigint
......@@ -138,7 +130,6 @@
{{ app_sh }} php -f occ db:convert-filecache-bigint
args:
chdir: "{{ app_dir }}"
become: False
- name: occ app:update --all
shell: |
......@@ -146,7 +137,6 @@
{{ app_sh }} php -f occ upgrade
args:
chdir: "{{ app_dir }}"
become: False
- name: occ app:{install,enable} twofactor_totp
shell: |
......@@ -155,7 +145,6 @@
{{ app_sh }} php -f occ app:enable twofactor_totp
args:
chdir: "{{ app_dir }}"
become: False
- name: occ app:enable encryption
shell: |
......@@ -164,21 +153,19 @@
{{ app_sh }} php -f occ config:app:set --value=yes core encryption_enabled
args:
chdir: "{{ app_dir }}"
become: False
- name: occ config:system:set mail
shell: |
set -e
{{ app_sh }} php -f occ config:system:set mail_domain --value={{ domain }} --type string
{{ app_sh }} php -f occ config:system:set mail_from_address --value=noreply --type string
{{ app_sh }} php -f occ config:system:set mail_smtpauth --value=0 --type int
{{ app_sh }} php -f occ config:system:set mail_smtphost --value=postfix-host.{{ domain }} --type string
{{ app_sh }} php -f occ config:system:delete mail_smtpauth
{{ app_sh }} php -f occ config:system:set mail_smtphost --value={{ inventory_hostname }}.{{ domain }} --type string
{{ app_sh }} php -f occ config:system:set mail_smtpmode --value=smtp --type string
{{ app_sh }} php -f occ config:system:set mail_smtpport --value=465 --type int
{{ app_sh }} php -f occ config:system:set mail_smtpsecure --value=ssl --type string
{{ app_sh }} php -f occ config:system:delete mail_smtpsecure
{{ app_sh }} php -f occ config:system:set mail_smtpport --value=25 --type int
args:
chdir: "{{ app_dir }}"
become: False
- name: occ app:enable activity
shell: |
......@@ -187,7 +174,6 @@
{{ app_sh }} php -f occ config:app:set --value=1 activity notify_email_file_created
args:
chdir: "{{ app_dir }}"
become: False
- when: enough_nextcloud_registration
block:
......@@ -203,7 +189,6 @@
{{ app_sh }} php -f occ app:enable registration
args:
chdir: "{{ app_dir }}"
become: False
- when: enough_nextcloud_enough
block:
......@@ -236,14 +221,12 @@
{{ app_sh }} php -f occ maintenance:theme:update
args:
chdir: "{{ app_dir }}"
become: False
- name: occ app:enable enough
shell: |
{{ app_sh }} php -f occ app:enable enough
args:
chdir: "{{ app_dir }}"
become: False
- name: apt-get install tor and torsocks
apt:
......@@ -298,11 +281,9 @@
{{ app_sh }} php -f occ config:system:set trusted_domains 2 --value {{ nextcloud_onion.stdout }}
args:
chdir: "{{ app_dir }}"
become: False
- name: (re)create nextcloud
shell: |
docker-compose up -d
args:
chdir: "{{ app_dir }}"
become: False
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment