diff --git a/README.md b/README.md index 1ec1828adf913b097f9dd95c7a62a3b3fae65c58..f17ad41176cf7a633c4254e6406b1724d068a10a 100644 --- a/README.md +++ b/README.md @@ -4,11 +4,12 @@ Basic server configuration used for most unix based servers at HsH. ## States -* apt -* openvmtools - -* iptables -* locale +* **apt** proxy, sources.list and sources.list.d +* **openvmtools** use them for vmware +* **locale** setup your servers locales +* **python-packages** we are using for salt grains or modules. + * **netifaces** useful information in grains about net cfg + * **psutil** who needs that?! ## Configuration diff --git a/hshbase/defaults.yaml b/hshbase/defaults.yaml index e88b8002fbbe7c23c5fcc5b00c183a749e840d08..7f8041127493f9ad287b8e142c2b91ce6c874188 100644 --- a/hshbase/defaults.yaml +++ b/hshbase/defaults.yaml @@ -6,3 +6,7 @@ hshbase: time: server: time.rz.fh-hannover.de zone: Europe/Berlin + locale: + system: en_US.UTF-8 + present: + - de_DE.UTF-8 diff --git a/hshbase/init.sls b/hshbase/init.sls index 60d3c73525bf5dac5be7c0ea765c4023656efe59..da8c9036126518f2e0b95f80e405d711c6d7bdde 100644 --- a/hshbase/init.sls +++ b/hshbase/init.sls @@ -1,8 +1,25 @@ {% from "hshbase/map.jinja" import hshbase with context %} -# Include all submodules by default. - +# Include all submodules by default - they ca be disable in pillar, if necessary include: - .apt - .openvmtools - .time + - .locale + +# Always ships this packages - we need them for grains +{% if grains['os'] == 'Debian' and grains['oscodename'] != 'squeeze' or grains['os'] == 'Ubuntu' %} +salt-python-packages: + pkg.installed: + - pkgs: + - python-netifaces + - python-psutil + +{% elif grains['os'] == 'FreeBSD' %} +salt-python-packages: + pkg.installed: + - pkgs: + - net/py-netifaces + - py27-psutil + +{% endif %} diff --git a/hshbase/locale.sls b/hshbase/locale.sls new file mode 100644 index 0000000000000000000000000000000000000000..c2b9e06adadbd6e5df9b2c93baacf7027f243dd5 --- /dev/null +++ b/hshbase/locale.sls @@ -0,0 +1,21 @@ +{% from "hshbase/map.jinja" import hshbase with context %} + +locales: + pkg.installed + +hshbase_locale_system: + locale.present: + - name: {{ hshbase.locale.system }} + +hshbase_locale_install_system: + locale.system: + - name: {{ hshbase.locale.system }} + - require: + - locale: hshbase_locale_system + +{% for locale in hshbase.locale.present %} +hshbase_locale_{{ loop.index }}: + locale.present: + - name: {{ locale }} + +{% endfor %}