Allow user to override UseRoutes in template
You could perhaps have a group_vars/designate_all.yml looking like this; --- lxc_container_networks: lxcbr0_address: ... dhcp_use_routes: false Change-Id: Id61fdb5a3b52a01a49242fc01cc01bf2dede09af
This commit is contained in:
parent
2c463783aa
commit
fd62da8df0
|
@ -10,8 +10,9 @@ Address={{ item.value.address }}/{{ addr_cidr }}
|
|||
UseDNS={{ (lxc_container_enable_resolved | bool) | ternary('yes', 'no') }}
|
||||
UseNTP=yes
|
||||
RouteMetric=20
|
||||
{% if hostvars[inventory_hostname]['gateway'] is defined %}
|
||||
UseRoutes=False
|
||||
{% if hostvars[inventory_hostname]['gateway'] is defined
|
||||
or item.value.dhcp_use_routes is defined %}
|
||||
UseRoutes={{ item.value.dhcp_use_routes | default(false) | bool | lower }}
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
|
Loading…
Reference in New Issue