chang mail to ssmtp
This commit is contained in:
parent
d0e621e2c4
commit
1dc7125bde
@ -76,7 +76,7 @@
|
|||||||
|
|
||||||
- server role
|
- server role
|
||||||
- [x] cron
|
- [x] cron
|
||||||
- [x] ssmtp
|
- [x] msmtp
|
||||||
|
|
||||||
|
|
||||||
- [x] rsyncd role
|
- [x] rsyncd role
|
||||||
|
@ -80,11 +80,10 @@ syncthing_address: "0.0.0.0:8384"
|
|||||||
syncthing_gui_user: "{{user.name}}"
|
syncthing_gui_user: "{{user.name}}"
|
||||||
syncthing_gui_password: $2a$10$nJZ8YN/1mB84Cbi79BKka.6SFMAKF.CBwyCNJDA9qUgXdkcuBilx2
|
syncthing_gui_password: $2a$10$nJZ8YN/1mB84Cbi79BKka.6SFMAKF.CBwyCNJDA9qUgXdkcuBilx2
|
||||||
|
|
||||||
notification_mail: "{{ user.mail }}"
|
notification_mail: "{{inventory_hostname}}@{{ domain.name }}"
|
||||||
ssmtp_mailhub: smtp.{{ domain.name }}:587
|
msmtp_mailhub: smtp.{{ domain.name }}
|
||||||
ssmtp_hostname: "{{ domain.name }}"
|
msmtp_auth_user: "{{ user.mail }}"
|
||||||
ssmtp_auth_user: "{{ user.mail }}"
|
msmtp_auth_pass: "{{ vault_default_password }}"
|
||||||
ssmtp_auth_pass: "{{ vault_default_password }}"
|
|
||||||
|
|
||||||
rsynclocations:
|
rsynclocations:
|
||||||
- name: backup nas
|
- name: backup nas
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
notification_mail: "{{inventory_hostname}}@ducamps.win"
|
|
||||||
ssmtp_mailhub: smtp.ducamps.win:587
|
|
||||||
ssmtp_hostname: ducamps.win
|
|
||||||
ssmtp_auth_user: vincent@ducamps.win
|
|
||||||
ssmtp_auth_pass: the_mandrill_api_key
|
|
@ -1,35 +0,0 @@
|
|||||||
|
|
||||||
- name: Install SSMTP
|
|
||||||
aur: name=ssmtp state=present
|
|
||||||
become_user: aur_builder
|
|
||||||
|
|
||||||
|
|
||||||
- name: Set up ssmtp.conf
|
|
||||||
template:
|
|
||||||
src: ssmtp_conf.j2
|
|
||||||
dest: /etc/ssmtp/ssmtp.conf
|
|
||||||
owner: root
|
|
||||||
group: mail
|
|
||||||
mode: 0640
|
|
||||||
become: yes
|
|
||||||
|
|
||||||
- name: Set up revaliases
|
|
||||||
template:
|
|
||||||
src: revaliases.j2
|
|
||||||
dest: /etc/ssmtp/revaliases
|
|
||||||
owner: root
|
|
||||||
group: mail
|
|
||||||
mode: 0640
|
|
||||||
become: yes
|
|
||||||
|
|
||||||
- name: set right on /usr/sbin/ssmtp
|
|
||||||
file:
|
|
||||||
path: /usr/sbin/ssmtp # required. Path to the file being managed.
|
|
||||||
group: mail # not required. Name of the group that should own the file/directory, as would be fed to I(chown).
|
|
||||||
mode: 2711 # not required. Mode the file or directory should be. For those used to I(/usr/bin/chmod) remember that modes are actually octal numbers. You must either add a leading zero so that Ansible's YAML parser knows it is an octal number (like C(0644) or C(01777)) or quote it (like C('644') or C('1777')) so Ansible receives a string and can do its own conversion from string into number. Giving Ansible a number without following one of these rules will end up with a decimal number which will have unexpected results. As of version 1.8, the mode may be specified as a symbolic mode (for example, C(u+rwx) or C(u=rw,g=r,o=r)).
|
|
||||||
owner: root # not required. Name of the user that should own the file/directory, as would be fed to I(chown).
|
|
||||||
become: yes
|
|
||||||
|
|
||||||
#sudo chown root:mail /usr/sbin/ssmtp /etc/ssmtp{,/{ssmtp.conf,revaliases}}
|
|
||||||
#sudo chmod 2711 /usr/sbin/ssmtp
|
|
||||||
#sudo chmod o-rwx /etc/ssmtp /etc/ssmtp/ssmtp.conf;
|
|
@ -1,3 +0,0 @@
|
|||||||
|
|
||||||
root:{{ notification_mail }}:{{ ssmtp_mailhub }}
|
|
||||||
{{ user.name }}:{{ notification_mail }}:{{ ssmtp_mailhub }}
|
|
@ -1,12 +0,0 @@
|
|||||||
|
|
||||||
# ---- basic config
|
|
||||||
root={{ssmtp_auth_user}}
|
|
||||||
AuthMethod=LOGIN
|
|
||||||
UseSTARTTLS=Yes
|
|
||||||
UseTLS=NO
|
|
||||||
hostname={{ssmtp_hostname}}
|
|
||||||
FromLineOverride=Yes
|
|
||||||
|
|
||||||
AuthUser={{ ssmtp_auth_user }}
|
|
||||||
mailhub={{ ssmtp_mailhub }}
|
|
||||||
AuthPass={{ ssmtp_auth_pass }}
|
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
roles:
|
roles:
|
||||||
- syncthing
|
- syncthing
|
||||||
- ssmtp
|
- msmtp
|
||||||
- cronie
|
- cronie
|
||||||
- rsyncd
|
- rsyncd
|
||||||
- gandi-dyn-dns
|
- gandi-dyn-dns
|
||||||
|
Loading…
Reference in New Issue
Block a user