diff --git a/nextcloud/ansible/roles/nextcloud/tasks/main.yml b/nextcloud/ansible/roles/nextcloud/tasks/main.yml index 1ae75aa..5faefea 100644 --- a/nextcloud/ansible/roles/nextcloud/tasks/main.yml +++ b/nextcloud/ansible/roles/nextcloud/tasks/main.yml @@ -383,6 +383,29 @@ - redis - notify_push +- name: Setup SMTP + block: + # 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: + - 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_smtphost --value={{ mail_smtphost }} --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 + become: true + become_user: "{{ web_user }}" + tags: + - smtp + when: mail_smtp_enabled + - name: Enable Nextcloud Calendar ansible.builtin.shell: cmd: |