add URL_BASE to vm hosts file

This commit is contained in:
Josh Patterson
2026-03-11 11:55:42 -04:00
parent 90137f7093
commit 89b18341c5
2 changed files with 7 additions and 1 deletions
@@ -29,7 +29,11 @@ sool9_{{host}}:
hypervisor_host: {{host ~ "_" ~ role}} hypervisor_host: {{host ~ "_" ~ role}}
preflight_cmds: preflight_cmds:
- | - |
tee -a /etc/hosts <<< "{{ MANAGERIP }} {{ MANAGERHOSTNAME }}" {%- set hostnames = [MANAGERHOSTNAME] %}
{%- if not (URL_BASE | ipaddr) and URL_BASE != MANAGERHOSTNAME %}
{%- do hostnames.append(URL_BASE) %}
{%- endif %}
tee -a /etc/hosts <<< "{{ MANAGERIP }} {{ hostnames | join(' ') }}"
- | - |
timeout 600 bash -c 'trap "echo \"Preflight Check: Failed to establish repo connectivity\"; exit 1" TERM; \ timeout 600 bash -c 'trap "echo \"Preflight Check: Failed to establish repo connectivity\"; exit 1" TERM; \
while ! dnf makecache --repoid=securityonion >/dev/null 2>&1; do echo "Preflight Check: Waiting for repo connectivity..."; \ while ! dnf makecache --repoid=securityonion >/dev/null 2>&1; do echo "Preflight Check: Waiting for repo connectivity..."; \
+2
View File
@@ -14,6 +14,7 @@
{% if 'vrt' in salt['pillar.get']('features', []) %} {% if 'vrt' in salt['pillar.get']('features', []) %}
{% set HYPERVISORS = salt['pillar.get']('hypervisor:nodes', {} ) %} {% set HYPERVISORS = salt['pillar.get']('hypervisor:nodes', {} ) %}
{% from 'salt/map.jinja' import SALTVERSION %} {% from 'salt/map.jinja' import SALTVERSION %}
{% from 'vars/globals.map.jinja' import GLOBALS %}
{% if HYPERVISORS %} {% if HYPERVISORS %}
cloud_providers: cloud_providers:
@@ -34,6 +35,7 @@ cloud_profiles:
MANAGERHOSTNAME: {{ grains.host }} MANAGERHOSTNAME: {{ grains.host }}
MANAGERIP: {{ pillar.host.mainip }} MANAGERIP: {{ pillar.host.mainip }}
SALTVERSION: {{ SALTVERSION }} SALTVERSION: {{ SALTVERSION }}
URL_BASE: {{ GLOBALS.url_base }}
- template: jinja - template: jinja
- makedirs: True - makedirs: True
{% else %} {% else %}