File tree Expand file tree Collapse file tree 5 files changed +22
-7
lines changed Expand file tree Collapse file tree 5 files changed +22
-7
lines changed Original file line number Diff line number Diff line change @@ -35,9 +35,10 @@ 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- 38+ keepalived_notification_email :
" [email protected] " 39+ # keepalived_notification_emails:
40+ # - "root@localhost"
41+ 4142verifier :
4243 name : " ansible"
4344scenario :
Original file line number Diff line number Diff line change @@ -156,7 +156,7 @@ keepalived_pid_file_path: "/run/keepalived/keepalived.pid"
156156List of email accounts that will receive notification mails :
157157
158158` ` ` yaml
159- keepalived_notification_email :
159+ keepalived_notification_emails :
160160 - 'root@localhost'
161161` ` `
162162
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ keepalived_pid_file_path: "/run/keepalived/keepalived.pid"
4545
4646
4747# Configure email accounts that will receive notification mails
48- keepalived_notification_email : ["root@localhost"]
48+ keepalived_notification_emails : ["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 1313 fail_msg : " Some mandatory variables are not set."
1414 success_msg : " All mandatory variables are set."
1515
16+ - name : " Variable keepalived_notification_email is deprecated"
17+ when : " keepalived_notification_email | default('') | length > 0"
18+ block :
19+
20+ - name : " Set keepalived_notification_emails variable"
21+ ansible.builtin.set_fact :
22+ keepalived_notification_emails : ["{{ keepalived_notification_email }}"]
23+
24+ - name : " Show deprecation warning"
25+ ansible.builtin.debug :
26+ msg :
27+ - " The variable keepalived_notification_email is deprecated and will be removed in the next major release."
28+ - " Please use list variable 'keepalived_notification_emails' instead."
29+
1630- name : " Install dependencies for Keepalived."
1731 become : true
1832 ansible.builtin.package :
Original file line number Diff line number Diff line change @@ -11,9 +11,9 @@ global_defs {
1111{% if keepalived_set_script_security_flag %}
1212 enable_script_security
1313{% endif %}
14- {% if keepalived_notification_email | default ([]) | length > 0 %}
14+ {% if keepalived_notification_emails | default ([]) | length > 0 %}
1515 notification_email {
16- {% for email in keepalived_notification_email %}
16+ {% for email in keepalived_notification_emails %}
1717 {{ email }}
1818{% endfor %}
1919 }
You can’t perform that action at this time.
0 commit comments