Skip to content

Commit a25efb1

Browse files
jackhodgkissAlex-Welsh
authored andcommitted
fix: restore ability to dump all configuration
When running `kayobe configuration dump` would fail with ``` ...FAILED! => \n msg: to_nice_yaml - 'hostvars'. 'hostvars' ``` This is due to the existence of variables that use `net_ip` filter. Therefore, this can be avoided by using `lookup` filter. Some of these changes are done within config and would be picked automatically. However some changes are done within the documentation and would require a user to update their configuration to benefit from the changes suggested. Note: This only works with you use `--limit` as the firewall configuration is within `all` group and gets evaluated by hosts that do not have network_interfaces such as switches. Due to the command producing a lot of output running the command without a `limit` it not advisable. Signed-off-by: Jack Hodgkiss <jack@stackhpc.com>
1 parent 7715c23 commit a25efb1

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

doc/source/configuration/walled-garden.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ In ``etc/kayobe/inventory/group_vars/overcloud/time``:
2929
# Following deployment we include the OpenStack VIP
3030
3131
chrony_ntp_servers:
32-
- server: "{{ admin_oc_net_name | net_ip(inventory_hostname=groups['seed'][0]) }}"
32+
- server: "http://{{ lookup('vars', admin_oc_net_name ~ '_ips')[groups.seed.0] }}:3128"
3333
3434
Proxy
3535
=====
@@ -62,7 +62,7 @@ proxy:
6262
---
6363
# HTTP proxy URL (format: http(s)://[user:password@]proxy_name:port). By
6464
# default no proxy is used.
65-
http_proxy: "http://{{ admin_oc_net_name | net_ip(inventory_hostname=groups['seed'][0]) }}:3128"
65+
http_proxy: "http://{{ lookup('vars', admin_oc_net_name ~ '_ips')[groups.seed.0] }}:3128"
6666
6767
# HTTPS proxy URL (format: http(s)://[user:password@]proxy_name:port). By
6868
# default no proxy is used.

etc/kayobe/inventory/group_vars/all/openbao.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ seed_openbao_pki_certificate_subject:
7777
- common_name: "{% if kolla_internal_fqdn != kolla_internal_vip_address %}{{ kolla_internal_fqdn }}{% else %}overcloud{% endif %}"
7878
role: "{{ seed_openbao_pki_role_name }}"
7979
extra_params:
80-
ip_sans: "{% for host in groups['controllers'] %}{{ internal_net_name | net_ip(host) }}{% if not loop.last %},{% endif %}{% endfor %},{{ kolla_internal_vip_address }}"
80+
ip_sans: "{% for host in groups['controllers'] %}{{ lookup('vars', internal_net_name ~ '_ips')[host] }}{% if not loop.last %},{% endif %}{% endfor %},{{ kolla_internal_vip_address }}"
8181

8282
# Enable OpenBao UI
8383
openbao_enable_ui: true

etc/kayobe/inventory/group_vars/all/vault

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,4 +88,4 @@ seed_vault_pki_certificate_subject:
8888
- common_name: "{% if kolla_internal_fqdn != kolla_internal_vip_address %}{{ kolla_internal_fqdn }}{% else %}overcloud{% endif %}"
8989
role: "{{ seed_vault_pki_role_name }}"
9090
extra_params:
91-
ip_sans: "{% for host in groups['controllers'] %}{{ internal_net_name | net_ip(host) }}{% if not loop.last %},{% endif %}{% endfor %},{{ kolla_internal_vip_address }}"
91+
ip_sans: "{% for host in groups['controllers'] %}{{ lookup('vars', internal_net_name ~ '_ips')[host] }}{% if not loop.last %},{% endif %}{% endfor %},{{ kolla_internal_vip_address }}"

etc/kayobe/inventory/group_vars/wazuh-agent/wazuh-agent

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
# Wazuh-Manager IP address
77
# Convenience var not used by wazuh-agent role
8-
wazuh_manager_address: "{{ admin_oc_net_name | net_ip(groups['wazuh-manager'][0]) }}"
8+
wazuh_manager_address: "{{ lookup('vars', admin_oc_net_name ~ '_ips')[groups['wazuh-manager'][0]] }}"
99

1010
# Wazuh-Manager API config
1111
wazuh_managers:

0 commit comments

Comments
 (0)