add mail support
This commit is contained in:
parent
a6d1261679
commit
b2c12380dc
2 changed files with 18 additions and 2 deletions
|
|
@ -1,5 +1,4 @@
|
|||
- name: install nextcloud
|
||||
register: nextcloudinstall
|
||||
unarchive:
|
||||
src: "https://download.nextcloud.com/server/releases/nextcloud-14.0.0.tar.bz2"
|
||||
remote_src: yes
|
||||
|
|
@ -11,10 +10,10 @@
|
|||
- name: setup nextcloud
|
||||
become_user: www-data
|
||||
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 }}'"
|
||||
args:
|
||||
chdir: /var/www/nextcloud
|
||||
creates: /var/www/nextcloud/config/config.php
|
||||
|
||||
- name: set nextcloud trusted domains
|
||||
become_user: www-data
|
||||
|
|
@ -23,6 +22,20 @@
|
|||
args:
|
||||
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
|
||||
template:
|
||||
src: nginx.j2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue