mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
cant get grains.filter_by to work for some reason
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
{% import_yaml 'salt/minion.defaults.yaml' as salt %}
|
||||
{% set SALTVERSION = salt.salt.minion.version %}
|
||||
|
||||
{% set SALTPACKAGES = salt['grains.filter_by']({
|
||||
'Ubuntu': {'common': 'salt-common'},
|
||||
'Centos': {'common': 'salt'},
|
||||
}) %}
|
||||
{% if grains.os|lower == 'ubuntu' %}
|
||||
{% set COMMON = 'salt-common' %}
|
||||
{% elif grains.os|lower == 'centos' %}
|
||||
{% set COMMON = 'salt' %}
|
||||
{% endif %}
|
||||
|
||||
{% if grains.saltversion|string != SALTVERSION|string %}
|
||||
{% if grains.os|lower == 'centos' %}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{% from 'salt/map.jinja' import SALTPACKAGES with context %}
|
||||
{% from 'salt/map.jinja' import COMMON with context %}
|
||||
{% from 'salt/map.jinja' import UPGRADECOMMAND with context %}
|
||||
|
||||
include:
|
||||
@@ -16,7 +16,7 @@ install_salt_minion:
|
||||
salt_minion_package:
|
||||
pkg.installed:
|
||||
- pkgs:
|
||||
- {{ SALTPACKAGES.common }}
|
||||
- {{ COMMON }}
|
||||
- salt-minion
|
||||
- hold: True
|
||||
|
||||
|
||||
Reference in New Issue
Block a user