Browse Source

Merge "Fix for Ansible playbook error, variable is undefined"

changes/30/696330/4
Zuul 2 years ago
committed by Gerrit Code Review
parent
commit
baa509f5a9
  1. 2
      tripleo_ansible/roles/tripleo-hieradata/templates/fqdn.j2
  2. 2
      tripleo_ansible/roles/tripleo-hieradata/templates/net_ip_map.j2

2
tripleo_ansible/roles/tripleo-hieradata/templates/fqdn.j2

@ -1,7 +1,7 @@
{% set fqdn = {} %}
{% set _ = fqdn.__setitem__('fqdn_ctlplane', (inventory_hostname ~ '.ctlplane.' ~ cloud_domain)) %}
{% set _ = fqdn.__setitem__('fqdn_canonical', (inventory_hostname ~ '.' ~ cloud_domain)) %}
{% if role_networks %}
{% if role_networks is defined %}
{% for network in enabled_networks %}
{% if network in role_networks %}
{% set _ = fqdn.__setitem__(('fqdn_' ~ networks[network]['name_lower']), (inventory_hostname ~ '.' ~ network | lower ~ '.' ~ cloud_domain)) %}

2
tripleo_ansible/roles/tripleo-hieradata/templates/net_ip_map.j2

@ -3,7 +3,7 @@
{% set _ = net_ip_map.__setitem__('ctlplane_subnet', ctlplane_ip ~ '/' ~ ctlplane_subnet_cidr) %}
{% set _ = net_ip_map.__setitem__('ctlplane_uri', (ctlplane_ip | ipwrap)) %}
{% for network in enabled_networks %}
{% if network_cidrs and ((network ~ '_cidr') in network_cidrs) %}
{% if network_cidrs is defined and ((network ~ '_cidr') in network_cidrs) %}
{% set _ = net_ip_map.__setitem__(networks[network]['name'], (hostvars[inventory_hostname][networks[network]['name'] ~ '_ip'])) %}
{% set _ = net_ip_map.__setitem__((networks[network]['name'] ~ '_subnet'), (hostvars[inventory_hostname][networks[network]['name'] ~ '_ip'] ~ '/' ~ network_cidrs[network ~ '_cidr'])) %}
{% set _ = net_ip_map.__setitem__((networks[network]['name'] ~ '_uri'), (hostvars[inventory_hostname][networks[network]['name'] ~ '_ip'] | ipwrap)) %}

Loading…
Cancel
Save