Skip to content
Extraits de code Groupes Projets
Non vérifiée Valider 4a361554 rédigé par Nicolas Quiniou-Briand's avatar Nicolas Quiniou-Briand
Parcourir les fichiers

permit to manage mail using another software

parent d3211923
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
---
manage_mail: 'enabled'
default_maintenance_email: "maintenance@example.org"
default_smtp_server: "smtp.example.org"
default_sshd_port: 10022
......
---
- name: remove mail packages not necessary
apt:
name: [bsd-mailx mailutils postfix]
autoremove: true
state: absent
when: ansible_os_family == "Debian"
- name: check that ssmtp is installed
package: name=ssmtp state=present
- name: Check that sendmail redirects to ssmtp
file:
src: ssmtp
dest: /usr/sbin/sendmail
force: true
owner: root
group: mail
state: link
- name: configuration file for ssmtp
template:
src: ssmtp.conf.j2
dest: /etc/ssmtp/ssmtp.conf
owner: root
group: mail
mode: '0640'
---
- name: remove mail packages not necessary
apt:
name: [bsd-mailx mailutils postfix]
autoremove: true
state: absent
when: ansible_os_family == "Debian"
- name: check that ssmtp is installed
package: name=ssmtp state=present
- name: import mail tasks
import_tasks: mail.yml
when: manage_mail == 'enabled'
- name: install fail2ban, iptables-persistent and auditd
package:
......@@ -30,15 +23,6 @@
state: present
when: ansible_check_mode
- name: Check that sendmail redirects to ssmtp
file:
src: ssmtp
dest: /usr/sbin/sendmail
force: true
owner: root
group: mail
state: link
- name: make fail2ban persistent
service: name=fail2ban enabled=yes state=started
......@@ -136,11 +120,3 @@
group: root
mode: '0640'
notify: restart auditd
- name: configuration file for ssmtp
template:
src: ssmtp.conf.j2
dest: /etc/ssmtp/ssmtp.conf
owner: root
group: mail
mode: '0640'
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter