From 229134ba0817462b601a1d7d420db57b21f07953 Mon Sep 17 00:00:00 2001
From: Dennis Ahrens <dennis.ahrens@hs-hannover.de>
Date: Tue, 3 May 2016 16:36:31 +0200
Subject: [PATCH] Add pkgs to apt substate

---
 hshbase/apt/init.sls  | 1 +
 hshbase/apt/pkgs.sls  | 5 +++++
 hshbase/defaults.yaml | 1 +
 pillar.example        | 1 +
 4 files changed, 8 insertions(+)
 create mode 100644 hshbase/apt/pkgs.sls

diff --git a/hshbase/apt/init.sls b/hshbase/apt/init.sls
index f3e0012..af285d1 100644
--- a/hshbase/apt/init.sls
+++ b/hshbase/apt/init.sls
@@ -3,6 +3,7 @@
 
 include:
   - .proxy
+  - .pkgs
 
 # control /apt/sources.list and apt.sources.list.d on ubuntu and debian
 {% if grains['os'] == 'Debian' and grains['oscodename'] in ['squeeze', 'wheezy', 'jessie']
diff --git a/hshbase/apt/pkgs.sls b/hshbase/apt/pkgs.sls
new file mode 100644
index 0000000..f8fb6c8
--- /dev/null
+++ b/hshbase/apt/pkgs.sls
@@ -0,0 +1,5 @@
+{% from "hshbase/map.jinja" import hshbase with context %}
+
+hshbase_apt_install_pkgs:
+  pkg.installed:
+    - pkgs: {{ hshbase.apt.pkgs }}
diff --git a/hshbase/defaults.yaml b/hshbase/defaults.yaml
index ecbeb53..54f1004 100644
--- a/hshbase/defaults.yaml
+++ b/hshbase/defaults.yaml
@@ -2,6 +2,7 @@ hshbase:
   apt:
     proxy: True
     proxy_address: http://apt-proxy.it.hs-hannover.de:8080
+    pkgs: []
   openvmtools: True
   time:
     server: time.rz.fh-hannover.de
diff --git a/pillar.example b/pillar.example
index 68b5669..3030e09 100644
--- a/pillar.example
+++ b/pillar.example
@@ -2,4 +2,5 @@ hshbase:
   apt:
     proxy: True  # if you do not want to to use apt-proxy: set to False
     proxy_address: http://apt-proxy.it.hs-hannover.de:8080
+    pkgs: [pwgen, tree]
   openvmtools: True
-- 
GitLab