Try passing in the list of hosts a different way.
This commit is contained in:
parent
7683da988a
commit
271300e94c
2 changed files with 3 additions and 3 deletions
|
@ -1,7 +1,7 @@
|
||||||
import operator
|
import operator
|
||||||
|
|
||||||
|
|
||||||
def invert_fedmsg_authz_policy(vars):
|
def invert_fedmsg_policy(hosts, vars):
|
||||||
""" Given hostvars that map hosts -> topics, invert that
|
""" Given hostvars that map hosts -> topics, invert that
|
||||||
and return a dict that maps topics -> hosts.
|
and return a dict that maps topics -> hosts.
|
||||||
|
|
||||||
|
@ -28,5 +28,5 @@ def invert_fedmsg_authz_policy(vars):
|
||||||
class FilterModule(object):
|
class FilterModule(object):
|
||||||
def filters(self):
|
def filters(self):
|
||||||
return {
|
return {
|
||||||
"invert_fedmsg_authz_policy": invert_fedmsg_authz_policy,
|
"invert_fedmsg_policy": invert_fedmsg_policy,
|
||||||
}
|
}
|
||||||
|
|
|
@ -220,7 +220,7 @@ config = dict(
|
||||||
{% if env == 'staging' %}
|
{% if env == 'staging' %}
|
||||||
# ** policy dynamically generated from inventory vars
|
# ** policy dynamically generated from inventory vars
|
||||||
# See ansible/filter_plugins/fedmsg.py for this inversion filter.
|
# See ansible/filter_plugins/fedmsg.py for this inversion filter.
|
||||||
{% for topic, certs in hostvars | invert_fedmsg_authz_policy %}
|
{% for topic, certs in groups['all'] | invert_fedmsg_policy(hostvars) %}
|
||||||
"{{topic}}": [
|
"{{topic}}": [
|
||||||
{% for cert in certs %}
|
{% for cert in certs %}
|
||||||
"{{ cert }}",{% endfor %}
|
"{{ cert }}",{% endfor %}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue