Skip to content

Commit 1e0094c

Browse files
committed
Add a flag to disable keepalived mail notification configuration
Signed-off-by: Norman Ziegner <[email protected]>
1 parent 8fcb6ba commit 1e0094c

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

roles/keepalived/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,14 @@ Path to the Keepalived PID file:
151151
keepalived_pid_file_path: "/run/keepalived/keepalived.pid"
152152
```
153153

154+
#### Configure email notification
155+
156+
Flag to enable/disable email notification settings:
157+
158+
```yaml
159+
keepalived_enable_mail_notification: true
160+
```
161+
154162
#### Configure notification email address
155163

156164
List of email accounts that will receive notification mails:

roles/keepalived/templates/keepalived.conf.j2

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ global_defs {
1111
{% if keepalived_set_script_security_flag %}
1212
enable_script_security
1313
{% endif %}
14+
{% if keepalived_enable_mail_notificationdefault(false) %}
1415
{% if keepalived_notification_email | default([]) | lenth > 0 %}
1516
notification_email {
1617
{% for email in keepalived_notification_email %}
@@ -21,6 +22,7 @@ global_defs {
2122
notification_email_from {{ keepalived_notification_email_from }}
2223
smtp_server {{ keepalived_smtp_server }}
2324
smtp_connect_timeout 30
25+
{% endif %}
2426
{% if keepalived_router_id is defined %}
2527
router_id {{ keepalived_router_id }}
2628
{% endif %}

0 commit comments

Comments
 (0)