From 24eadf250768320433c158318c3e4253b83d52e8 Mon Sep 17 00:00:00 2001 From: m0duspwnens Date: Thu, 16 Jan 2025 17:46:20 -0500 Subject: [PATCH] add libvirt state to highstate for hypervisor. update allowed_states for libvirt --- salt/allowed_states.map.jinja | 6 ++++-- salt/libvirt/packages.sls | 2 +- salt/libvirt/ssh/users.sls | 2 +- salt/top.sls | 1 + 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/salt/allowed_states.map.jinja b/salt/allowed_states.map.jinja index 25cae50a7..694c81bae 100644 --- a/salt/allowed_states.map.jinja +++ b/salt/allowed_states.map.jinja @@ -86,7 +86,8 @@ 'so-manager': [ 'salt.master', 'salt.cloud', - 'libvirt', + 'libvirt.packages', + 'libvirt.ssh.users', 'ca', 'ssl', 'registry', @@ -208,7 +209,8 @@ 'schedule', 'docker_clean', 'stig', - 'hypervisor' + 'hypervisor', + 'libvirt' ], 'so-desktop': [ 'ssl', diff --git a/salt/libvirt/packages.sls b/salt/libvirt/packages.sls index b1688b483..73a96811f 100644 --- a/salt/libvirt/packages.sls +++ b/salt/libvirt/packages.sls @@ -10,7 +10,7 @@ # software that is protected by the license key." {% from 'allowed_states.map.jinja' import allowed_states %} -{% if sls.split('.')[0] in allowed_states %} +{% if sls.split('.')[0] in allowed_states or sls in allowed_states %} {% if 'hvn' in salt['pillar.get']('features', []) %} # allows for creating vm images diff --git a/salt/libvirt/ssh/users.sls b/salt/libvirt/ssh/users.sls index 0829075d2..9b6a3beb7 100644 --- a/salt/libvirt/ssh/users.sls +++ b/salt/libvirt/ssh/users.sls @@ -10,7 +10,7 @@ # software that is protected by the license key." {% from 'allowed_states.map.jinja' import allowed_states %} -{% if sls in allowed_states %} +{% if sls.split('.')[0] in allowed_states or sls in allowed_states %} {% if 'hvn' in salt['pillar.get']('features', []) %} {% from 'vars/globals.map.jinja' import GLOBALS %} diff --git a/salt/top.sls b/salt/top.sls index 4f85b999e..d16e34d55 100644 --- a/salt/top.sls +++ b/salt/top.sls @@ -275,6 +275,7 @@ base: - firewall - elasticfleet.install_agent_grid - libvirt + - libvirt.images - stig '*_desktop and G@saltversion:{{saltversion}}':