Skip to content

Commit 176f4ce

Browse files
committed
Make keepalived_notification_email a list
Signed-off-by: Norman Ziegner <[email protected]>
1 parent e79578c commit 176f4ce

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

molecule/keepalived/molecule.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff 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"
40+
3841
verifier:
3942
name: "ansible"
4043
scenario:

roles/keepalived/defaults/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ keepalived_service_file_path: "/etc/systemd/system/keepalived.service"
4444
keepalived_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"]
4949
# Configure notification sender
5050
keepalived_notification_email_from: "keepalived@localhost"
5151
# Configure SMTP Server

roles/keepalived/templates/keepalived.conf.j2

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ global_defs {
1212
enable_script_security
1313
{% endif %}
1414
notification_email {
15-
{{ keepalived_notification_email }}
15+
{% for email in keepalived_notification_email %}
16+
{{ email }}
17+
{% endfor %}
1618
}
1719
notification_email_from {{ keepalived_notification_email_from }}
1820
smtp_server {{ keepalived_smtp_server }}

0 commit comments

Comments
 (0)