reconfigure relayhost with exim4

This commit is contained in:
Ruben Blanco 2023-10-13 14:49:11 +02:00
parent a574fdc052
commit 2facb281a2
2 changed files with 44 additions and 6 deletions

View File

@ -0,0 +1,5 @@
# restart exim4 service to apply changes
- name: Restart exim4 service
service:
name: exim4
state: restarted

View File

@ -34,16 +34,49 @@
upgrade: dist
state: latest
# install exim4
- name: install exim4
# install packages
- name: install some packages (vim htop psmisc aptitude)
apt:
name: exim4
name: "{{ item }}"
state: present
with_items:
- vim
- htop
- psmisc
- aptitude
- nslcd
- exim4
# install exim4 ---> instalacion en Install packages task
#- name: install exim4
# apt:
# name: exim4
# state: present
# Reconfigure relayhost smtp to smtp.verdnatura.es
- name: reconfigure relayhost to smtp.verdnatura.es
debconf:
name: exim4-config
question: exim4/dc_smarthost
value: smtp.verdnatura.es
vtype: string
question: "{{ item.name }}"
value: "{{ item.value }}"
vtype: string
loop:
- name: exim4/dc_smarthost
value: smtp.verdnatura.es
- name: exim4/dc_local_interfaces
value: ""
- name: exim4/dc_minimaldns
value: 'false'
- name: exim4/dc_readhost
value: "{{ dc_readhost }}" # var to define survey(encuesta)
- name: exim4/dc_other_hostnames
value: ""
- name: exim4/dc_eximconfig_configtype
value: "mail sent by smarthost; no local mail"
- name: exim4/mailname
value: "{{ mailname }}" # var to define survey(encuesta)
- name: exim4/use_split_config
value: 'false'
notify: Restart exim4 service
# configure centralized authentication