Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid jinja2 in when warnings #3

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
# Copyright 2017, Logan Vig <logan2211@gmail.com>
# Copyright 2017, Major Hayden <major@mhtx.net>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -14,7 +15,7 @@
# limitations under the License.

# Can be used to completely disable the role's handler actions
haproxy_management: "{{ haproxy_hosts | default([]) | length > 0 }}"
haproxy_management: yes
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you trim the whitespace at the end of the line


# Selection of load balancer hosts to manage endpoints on
haproxy_group: haproxy
Expand Down
5 changes: 4 additions & 1 deletion handlers/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
# Copyright 2017, Logan Vig <logan2211@gmail.com>
# Copyright 2017, Major Hayden <major@mhtx.net>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -26,5 +27,7 @@
weight: "{{ haproxy_weight | default(omit) }}"
delegate_to: "{{ item }}"
with_items: "{{ haproxy_hosts }}"
when: haproxy_management | bool
when:
- haproxy_hosts | default([]) | length > 0
- haproxy_management | bool
listen: Manage LB