Compare commits
4 commits
master
...
imcsk8/add
Author | SHA1 | Date | |
---|---|---|---|
|
81f9bda6cd | ||
|
cf4aa26c69 | ||
|
80d6edd0ac | ||
4723ed547c |
2 changed files with 50 additions and 0 deletions
|
@ -383,6 +383,43 @@
|
||||||
- redis
|
- redis
|
||||||
- notify_push
|
- notify_push
|
||||||
|
|
||||||
|
- name: Setup SMTP
|
||||||
|
block:
|
||||||
|
- name: Unset Nextcloud's config.php read-only setting.
|
||||||
|
lineinfile:
|
||||||
|
path: "{{ nextcloud_path }}/config/config.php"
|
||||||
|
state: absent
|
||||||
|
regexp: "config_is_read_only"
|
||||||
|
|
||||||
|
# TODO: Para que la configuración sea más flexible, debemos considerar que no todas estas variables se usan en todas las
|
||||||
|
# permutaciones de la configuración. Necesitamos separarlas.
|
||||||
|
#
|
||||||
|
# issue: <pendiente>
|
||||||
|
- name: Configure SMTP
|
||||||
|
ansible.builtin.shell:
|
||||||
|
cmd: |
|
||||||
|
/usr/bin/php {{ nextcloud_occ }} config:system:set mail_smtpmode --value={{ mail_smtpmode }} --type=string
|
||||||
|
/usr/bin/php {{ nextcloud_occ }} config:system:set mail_sendmailmode --value={{ mail_sendmailmode }} --type=string
|
||||||
|
/usr/bin/php {{ nextcloud_occ }} config:system:set mail_smtpsecure --value={{ mail_smtpsecure }} --type=string
|
||||||
|
/usr/bin/php {{ nextcloud_occ }} config:system:set mail_from_address --value={{ mail_from_address}} --type=string
|
||||||
|
/usr/bin/php {{ nextcloud_occ }} config:system:set mail_domain --value={{ mail_domain}} --type=string
|
||||||
|
/usr/bin/php {{ nextcloud_occ }} config:system:set mail_smtphost --value={{ mail_smtphost }} --type=string
|
||||||
|
/usr/bin/php {{ nextcloud_occ }} config:system:set mail_smtpport --value={{ mail_smtpport }} --type=integer
|
||||||
|
/usr/bin/php {{ nextcloud_occ }} config:system:set mail_smtpauth --value={{ mail_smtpauth }} --type=integer
|
||||||
|
/usr/bin/php {{ nextcloud_occ }} config:system:set mail_smtpname --value={{ mail_smtpname }} --type=string
|
||||||
|
/usr/bin/php {{ nextcloud_occ }} config:system:set mail_smtppassword --value={{ mail_smtppassword }} --type=string
|
||||||
|
become: true
|
||||||
|
become_user: "{{ web_user }}"
|
||||||
|
|
||||||
|
- name: Set Nextcloud's config.php read only setting.
|
||||||
|
ansible.builtin.shell:
|
||||||
|
cmd: "/usr/bin/php {{ nextcloud_occ }} config:system:set config_is_read_only --value=true --type=bool"
|
||||||
|
become: true
|
||||||
|
become_user: "{{ web_user }}"
|
||||||
|
tags:
|
||||||
|
- smtp
|
||||||
|
when: mail_smtp_enabled
|
||||||
|
|
||||||
- name: Enable Nextcloud Calendar
|
- name: Enable Nextcloud Calendar
|
||||||
ansible.builtin.shell:
|
ansible.builtin.shell:
|
||||||
cmd: |
|
cmd: |
|
||||||
|
|
|
@ -22,6 +22,19 @@ nextcloud_db: nextcloud
|
||||||
nextcloud_db_user: nextcloud
|
nextcloud_db_user: nextcloud
|
||||||
nextcloud_db_user_password: Una contraseña bien, pero bien difícil.
|
nextcloud_db_user_password: Una contraseña bien, pero bien difícil.
|
||||||
|
|
||||||
|
## SMTP
|
||||||
|
mail_smtp_enabled: false
|
||||||
|
mail_smtpmode: smtp
|
||||||
|
mail_sendmailmode: smtp
|
||||||
|
mail_smtpsecure: ssl
|
||||||
|
mail_from_address: CHANGEME
|
||||||
|
mail_domain: CHANGEME
|
||||||
|
mail_smtphost: CHANGEME
|
||||||
|
mail_smtpport: 587
|
||||||
|
mail_smtpauth: 0
|
||||||
|
mail_smtpname: ''
|
||||||
|
mail_smtppassword: ''
|
||||||
|
|
||||||
## LDAP
|
## LDAP
|
||||||
ldap_enabled: false
|
ldap_enabled: false
|
||||||
ldap_agent_password: cIBI4mLESN1nSrAPr7pX3350NPXkD3vExjr27X1ju
|
ldap_agent_password: cIBI4mLESN1nSrAPr7pX3350NPXkD3vExjr27X1ju
|
||||||
|
|
Loading…
Reference in a new issue