Skip to content

Commit

Permalink
Merge pull request evrardjp#56 from major/bug/1742487
Browse files Browse the repository at this point in the history
Add keepalived_global_defs configuration directive
  • Loading branch information
evrardjp authored Jan 22, 2018
2 parents e38bcf0 + 9f03e95 commit 2b4a1f3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
6 changes: 6 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,9 @@ cache_timeout: 600
keepalived_instances: []
keepalived_sync_groups: {}
keepalived_bind_on_non_local: False

# This list of strings will appear in the global_defs section of the
# keepalived configuration file.
# Example:
#keepalived_global_defs:
# - enable_script_security
8 changes: 8 additions & 0 deletions templates/keepalived.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.

{% if keepalived_global_defs is defined %}
global_defs {
{% for def in keepalived_global_defs %}
{{ def }}
{% endfor %}
}
{% endif %}

{% for name, sync_group in keepalived_sync_groups.items() %}
vrrp_sync_group {{ name }} {
group {
Expand Down

0 comments on commit 2b4a1f3

Please sign in to comment.