From b741ad58fc6e9cad17e7ddfeaaadea9373a9c56d Mon Sep 17 00:00:00 2001 From: Jonas Forsberg Date: Fri, 14 Aug 2020 15:21:45 +0200 Subject: [PATCH] Added pattern support for package install --- salt/pillars/hosts/exsilio.sls | 2 ++ salt/pillars/packages.sls | 1 + salt/states/packages.sls | 4 +++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/salt/pillars/hosts/exsilio.sls b/salt/pillars/hosts/exsilio.sls index 147a205..4faa42c 100644 --- a/salt/pillars/hosts/exsilio.sls +++ b/salt/pillars/hosts/exsilio.sls @@ -4,6 +4,8 @@ include: packages: teams: { status: installed } python3-susepubliccloudinfo: { status: installed } + pattern:kvm_server: { status: installed } + pattern:kvm_tools: { status: installed } firefox: addons: diff --git a/salt/pillars/packages.sls b/salt/pillars/packages.sls index dd547de..65b911d 100644 --- a/salt/pillars/packages.sls +++ b/salt/pillars/packages.sls @@ -14,3 +14,4 @@ packages: # vim-instant-markdown xdg-utils: { status: installed } nodejs10: { status: installed } + pattern:devel_basis: { status: installed } diff --git a/salt/states/packages.sls b/salt/states/packages.sls index e748573..d91cd4b 100644 --- a/salt/states/packages.sls +++ b/salt/states/packages.sls @@ -1,6 +1,8 @@ {% for package, args in pillar['packages'].items() %} {% if args['status'] != 'ignore' %} {{ package }}: - pkg.{{ args['status'] }} + pkg.{{ args['status'] }}: + - name: {{ package }} + - includes: [pattern] {% endif %} {% endfor %}