File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 11
11
- " allow localhost"
12
12
13
13
14
+ - when : when enable_mail_alerts == True and smtp_use_tls == True
15
+ name : set tls_option
16
+ set_fact : smtp_tls_option="using tlsv1"
17
+
18
+ - when : when enable_mail_alerts == True and smtp_use_tls != True
19
+ name : set tls_option
20
+ set_fact : smtp_tls_option=""
21
+
22
+
23
+ - when : when enable_mail_alerts == True
24
+ name : set mail server for notifications in monit
25
+ lineinfile : dest=/etc/monit/monitrc line="{{ item }}"
26
+ with_items :
27
+ - " set mailserver {{ smtp_host }} port {{ smtp_port }} username {{ smtp_user }} password {{ smtp_password }} {{ smtp_tls_option }} with timeout 30 seconds"
28
+
29
+
14
30
- name : start monit & mark to be started on system reboots
15
31
service : name=monit state=started enabled=yes
16
32
You can’t perform that action at this time.
0 commit comments