Hi,
I'm trying to find a way to grab RabbitMQ plugins when an URL is specified as value of a key (because some of them are include but not activated with RabbitMQ, while others are not included).
I'd like to have a single dict containing both and in the case where a value is not specified, it's implicitly included in RabiitMQ. Here is what I've got:
And in the role I've:
- name: download and install additionnal plugins
get_url: url={{item.value}} dest={{rabbitmq_plugins_folder}} owner=root group=root mode=0644
with_dict: rabbitmq_plugins
when: "item.key is defined"
Unfortunately it fails like this:
If I modify the when statement like this: when: "item.key is defined or item.value is not Null", I got:
fatal: [10.200.0.18] => Failed to template {% if item.key is defined or item.value is not Null %} True {% else %} False {% endif %}: template error while templating string: no test named 'Null'
Any idea how I can make it work properly ?
Thanks