Skip to content

Instantly share code, notes, and snippets.

@jimmymccrory
Created March 10, 2017 18:54
Show Gist options
  • Save jimmymccrory/a1f9aafbf03f62c1852735b52d82af4e to your computer and use it in GitHub Desktop.
Save jimmymccrory/a1f9aafbf03f62c1852735b52d82af4e to your computer and use it in GitHub Desktop.
lbaas long jinja
---
- name: compare jinja output
hosts: localhost
connection: local
gather_facts: no
tasks:
- debug:
msg: "{% if neutron_lbaas_namespace | bool %}LOADBALANCERV2:Haproxy:neutron_lbaas.drivers.haproxy.plugin_driver.HaproxyOnHostPluginDriver{% if neutron_lbaas_octavia | bool %},LOADBALANCERV2:Octavia:neutron_lbaas.drivers.octavia.driver.OctaviaDriver:default{% else %}:default{% endif %}{% endif %}"
- debug:
msg: "{% if neutron_lbaas_namespace | bool %}LOADBALANCERV2:Haproxy:neutron_lbaas.drivers.haproxy.plugin_driver.HaproxyOnHostPluginDriver{% if neutron_lbaas_octavia | bool %},{% else %}:default{% endif %}{% endif %}{% if neutron_lbaas_octavia | bool %}LOADBALANCERV2:Octavia:neutron_lbaas.drivers.octavia.driver.OctaviaDriver:default{% endif %}"
vars:
neutron_lbaas_namespace: true
neutron_lbaas_octavia: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment