Exclude empty groups
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
This commit is contained in:
parent
d1ee16d332
commit
8b23d10aff
1 changed files with 2 additions and 0 deletions
|
@ -4,12 +4,14 @@
|
|||
## {{ env }}
|
||||
|
||||
{% for key, value in groups.iteritems() %}
|
||||
{% if groups[key] != [] %}
|
||||
define hostgroup{
|
||||
hostgroup_name {{ key }}
|
||||
alias {{ key }}
|
||||
members {% for host in groups[key] %}{{host}}, {% endfor %}
|
||||
|
||||
}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue