nextcloud: versión funcional de configuración de SMTP
This commit is contained in:
parent
cf4aa26c69
commit
81f9bda6cd
1 changed files with 18 additions and 4 deletions
|
@ -385,6 +385,12 @@
|
|||
|
||||
- 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.
|
||||
#
|
||||
|
@ -393,13 +399,21 @@
|
|||
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_smtphost --value={{ mail_smtphost }} --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_smtpauth --value={{ mail_smtpauth }} --type=bool
|
||||
/usr/bin/php {{ nextcloud_occ }} config:system:set mail_smtppassword --value={{ mail_smtppassword }} --type=string
|
||||
/usr/bin/php {{ nextcloud_occ }} config:system:set mail_smtpport --value={{ mail_smtpport }} --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:
|
||||
|
|
Loading…
Reference in a new issue