File tree Expand file tree Collapse file tree 4 files changed +13
-5
lines changed Expand file tree Collapse file tree 4 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,9 @@ provisioner:
3535 - " 172.17.0.3"
3636 - " 172.17.0.4"
3737 keepalived_virtual_ip_address : " 172.17.0.20"
38+ keepalived_notification_email :
39+ - " root@localhost"
40+ 3841verifier :
3942 name : " ansible"
4043scenario :
Original file line number Diff line number Diff line change @@ -153,10 +153,11 @@ keepalived_pid_file_path: "/run/keepalived/keepalived.pid"
153153
154154# ### Configure notification email address
155155
156- Configure recipient of notification emails :
156+ List of email accounts that will receive notification mails :
157157
158158` ` ` yaml
159- keepalived_notification_email: 'name@localhost'
159+ keepalived_notification_email:
160+ - 'root@localhost'
160161` ` `
161162
162163# ### Configure notification sender
Original file line number Diff line number Diff line change @@ -44,8 +44,8 @@ keepalived_service_file_path: "/etc/systemd/system/keepalived.service"
4444keepalived_pid_file_path : " /run/keepalived/keepalived.pid"
4545
4646
47- # Configure notification email address
48- keepalived_notification_email : " name @localhost"
47+ # Configure email accounts that will receive notification mails
48+ keepalived_notification_email : ["root @localhost"]
4949# Configure notification sender
5050keepalived_notification_email_from : " keepalived@localhost"
5151# Configure SMTP Server
Original file line number Diff line number Diff line change @@ -11,9 +11,13 @@ global_defs {
1111{% if keepalived_set_script_security_flag %}
1212 enable_script_security
1313{% endif %}
14+ {% if keepalived_notification_email | default ([]) | length > 0 %}
1415 notification_email {
15- {{ keepalived_notification_email }}
16+ {% for email in keepalived_notification_email %}
17+ {{ email }}
18+ {% endfor %}
1619 }
20+ {% endif %}
1721 notification_email_from {{ keepalived_notification_email_from }}
1822 smtp_server {{ keepalived_smtp_server }}
1923 smtp_connect_timeout 30
You can’t perform that action at this time.
0 commit comments