add mail support
This commit is contained in:
parent
a6d1261679
commit
b2c12380dc
2 changed files with 18 additions and 2 deletions
|
|
@ -2,6 +2,9 @@ nextcloud:
|
||||||
upload_size_max: 512M
|
upload_size_max: 512M
|
||||||
datadir: /var/www/nextcloud/data
|
datadir: /var/www/nextcloud/data
|
||||||
externalurl: example.com
|
externalurl: example.com
|
||||||
|
mail:
|
||||||
|
from: www-data
|
||||||
|
domain: localhost
|
||||||
admin:
|
admin:
|
||||||
pw: "{{ lookup('password', '/dev/null') }}"
|
pw: "{{ lookup('password', '/dev/null') }}"
|
||||||
name: admin
|
name: admin
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
- name: install nextcloud
|
- name: install nextcloud
|
||||||
register: nextcloudinstall
|
|
||||||
unarchive:
|
unarchive:
|
||||||
src: "https://download.nextcloud.com/server/releases/nextcloud-14.0.0.tar.bz2"
|
src: "https://download.nextcloud.com/server/releases/nextcloud-14.0.0.tar.bz2"
|
||||||
remote_src: yes
|
remote_src: yes
|
||||||
|
|
@ -11,10 +10,10 @@
|
||||||
- name: setup nextcloud
|
- name: setup nextcloud
|
||||||
become_user: www-data
|
become_user: www-data
|
||||||
become: true
|
become: true
|
||||||
when: nextcloudinstall is changed
|
|
||||||
command: "/usr/bin/php occ maintenance:install -n --database 'mysql' --database-name '{{ nextcloud.db.name }}' --database-user '{{ nextcloud.db.user }}' --database-pass '{{ nextcloud.db.pw }}' --admin-user '{{ nextcloud.admin.name }}' --admin-pass '{{ nextcloud.admin.pw }}'"
|
command: "/usr/bin/php occ maintenance:install -n --database 'mysql' --database-name '{{ nextcloud.db.name }}' --database-user '{{ nextcloud.db.user }}' --database-pass '{{ nextcloud.db.pw }}' --admin-user '{{ nextcloud.admin.name }}' --admin-pass '{{ nextcloud.admin.pw }}'"
|
||||||
args:
|
args:
|
||||||
chdir: /var/www/nextcloud
|
chdir: /var/www/nextcloud
|
||||||
|
creates: /var/www/nextcloud/config/config.php
|
||||||
|
|
||||||
- name: set nextcloud trusted domains
|
- name: set nextcloud trusted domains
|
||||||
become_user: www-data
|
become_user: www-data
|
||||||
|
|
@ -23,6 +22,20 @@
|
||||||
args:
|
args:
|
||||||
chdir: /var/www/nextcloud
|
chdir: /var/www/nextcloud
|
||||||
|
|
||||||
|
- name: set other nextcloud config values
|
||||||
|
become_user: www-data
|
||||||
|
become: true
|
||||||
|
command: '/usr/bin/php occ config:system:set "{{ item.key }}" --value "{{ item.value }}"'
|
||||||
|
args:
|
||||||
|
chdir: /var/www/nextcloud
|
||||||
|
with_items:
|
||||||
|
- { key: "mail_from_address", value: "{{ nextcloud.mail.from }}" }
|
||||||
|
- { key: "mail_domain", value: "{{ nextcloud.eail.domain }}" }
|
||||||
|
- { key: "mail_smtpmode", value: "smtp" }
|
||||||
|
- { key: "mail_smtpauthtype", value: "PLAIN" }
|
||||||
|
- { key: "mail_smtphost", value: "{{ mail.server }}" }
|
||||||
|
- { key: "mail_smtpport", value: "25" }
|
||||||
|
|
||||||
- name: copy nextcloud nginx config
|
- name: copy nextcloud nginx config
|
||||||
template:
|
template:
|
||||||
src: nginx.j2
|
src: nginx.j2
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue