diff --git a/salt/common/packages.sls b/salt/common/packages.sls index c5d2729fd..5e72c50ee 100644 --- a/salt/common/packages.sls +++ b/salt/common/packages.sls @@ -1,6 +1,6 @@ -{% from 'vars/globals.map.jinja' import GLOBALS %} - -{% if GLOBALS.os_family == 'Debian' %} +# we cannot import GLOBALS from vars/globals.map.jinja in this state since it is called in setup.virt.init +# since it is early in setup of a new VM, the pillars imported in GLOBALS are not yet defined +{% if grains.os_family == 'Debian' %} commonpkgs: pkg.installed: - skip_suggestions: True @@ -45,7 +45,7 @@ python-rich: {% endif %} {% endif %} -{% if GLOBALS.os_family == 'RedHat' %} +{% if grains.os_family == 'RedHat' %} remove_mariadb: pkg.removed: diff --git a/salt/setup/virt/init.sls b/salt/setup/virt/init.sls index 384ae706f..9c173a78e 100644 --- a/salt/setup/virt/init.sls +++ b/salt/setup/virt/init.sls @@ -1,4 +1,5 @@ include: - setup.virt.setHostname - setup.virt.sominion + - common.packages # python3-dnf-plugin-versionlock - setup.virt.setSalt