Skip to content
Snippets Groups Projects
Commit 43857012 authored by Dennis Ahrens's avatar Dennis Ahrens
Browse files

Prepared the formula for buster

parent d60461b0
No related branches found
No related tags found
No related merge requests found
name: hshbase
os: Debian, FreeBSD
os_family: Debian, FreeBSD
version: 201907
release: 1
summary: Formula that bundles some base configuration we want to enforce everywhere.
description: Not more to say as said in the summary already.
\ No newline at end of file
...@@ -17,6 +17,9 @@ Configures apt package manager on debian and ubuntu machines ...@@ -17,6 +17,9 @@ Configures apt package manager on debian and ubuntu machines
### hshbase.time ### hshbase.time
**DEPRECATED** this formula only manages the time server up to debian 9 and ubuntu 16.04.
Starting with debian buster and ubuntu bionic beaver we use the systemd formula for network and timeserver configuration.
Install NTP, and sets timezone + timeserver Install NTP, and sets timezone + timeserver
### hshbase.openvmtools ### hshbase.openvmtools
...@@ -27,10 +30,6 @@ Install the package open-vm-tools ...@@ -27,10 +30,6 @@ Install the package open-vm-tools
Install system locales and additional ones optionally Install system locales and additional ones optionally
### hshbase.snmpd
Install snmpd ready to be used with [Whats Up Gold](https://whatsup.fh-h.de/)
### python-packages ### python-packages
Install python modules for salt grains or modules - Currently: Install python modules for salt grains or modules - Currently:
......
...@@ -26,28 +26,26 @@ deb-src http://ftp.de.debian.org/debian {{ oscodename }}-lts main non-free ...@@ -26,28 +26,26 @@ deb-src http://ftp.de.debian.org/debian {{ oscodename }}-lts main non-free
{% elif os == 'Ubuntu' %} {% elif os == 'Ubuntu' %}
{% if oscodename == 'trusty' %} deb http://de.archive.ubuntu.com/ubuntu/ {{ oscodename }} main restricted
deb http://de.archive.ubuntu.com/ubuntu/ trusty main restricted deb-src http://de.archive.ubuntu.com/ubuntu/ {{ oscodename }} main restricted
deb-src http://de.archive.ubuntu.com/ubuntu/ trusty main restricted deb http://de.archive.ubuntu.com/ubuntu/ {{ oscodename }}-updates main restricted
deb http://de.archive.ubuntu.com/ubuntu/ trusty-updates main restricted deb-src http://de.archive.ubuntu.com/ubuntu/ {{ oscodename }}-updates main restricted
deb-src http://de.archive.ubuntu.com/ubuntu/ trusty-updates main restricted deb http://de.archive.ubuntu.com/ubuntu/ {{ oscodename }} universe
deb http://de.archive.ubuntu.com/ubuntu/ trusty universe deb-src http://de.archive.ubuntu.com/ubuntu/ {{ oscodename }} universe
deb-src http://de.archive.ubuntu.com/ubuntu/ trusty universe deb http://de.archive.ubuntu.com/ubuntu/ {{ oscodename }}-updates universe
deb http://de.archive.ubuntu.com/ubuntu/ trusty-updates universe deb-src http://de.archive.ubuntu.com/ubuntu/ {{ oscodename }}-updates universe
deb-src http://de.archive.ubuntu.com/ubuntu/ trusty-updates universe deb http://de.archive.ubuntu.com/ubuntu/ {{ oscodename }} multiverse
deb http://de.archive.ubuntu.com/ubuntu/ trusty multiverse deb-src http://de.archive.ubuntu.com/ubuntu/ {{ oscodename }} multiverse
deb-src http://de.archive.ubuntu.com/ubuntu/ trusty multiverse deb http://de.archive.ubuntu.com/ubuntu/ {{ oscodename }}-updates multiverse
deb http://de.archive.ubuntu.com/ubuntu/ trusty-updates multiverse deb-src http://de.archive.ubuntu.com/ubuntu/ {{ oscodename }}-updates multiverse
deb-src http://de.archive.ubuntu.com/ubuntu/ trusty-updates multiverse deb http://de.archive.ubuntu.com/ubuntu/ {{ oscodename }}-backports main restricted universe multiverse
deb http://de.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse deb-src http://de.archive.ubuntu.com/ubuntu/ {{ oscodename }}-backports main restricted universe multiverse
deb-src http://de.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse deb http://security.ubuntu.com/ubuntu {{ oscodename }}-security main restricted
deb http://security.ubuntu.com/ubuntu trusty-security main restricted deb-src http://security.ubuntu.com/ubuntu {{ oscodename }}-security main restricted
deb-src http://security.ubuntu.com/ubuntu trusty-security main restricted deb http://security.ubuntu.com/ubuntu {{ oscodename }}-security universe
deb http://security.ubuntu.com/ubuntu trusty-security universe deb-src http://security.ubuntu.com/ubuntu {{ oscodename }}-security universe
deb-src http://security.ubuntu.com/ubuntu trusty-security universe deb http://security.ubuntu.com/ubuntu {{ oscodename }}-security multiverse
deb http://security.ubuntu.com/ubuntu trusty-security multiverse deb-src http://security.ubuntu.com/ubuntu {{ oscodename }}-security multiverse
deb-src http://security.ubuntu.com/ubuntu trusty-security multiverse
{% endif %}
{% else %} {% else %}
# Something went wrong - apt-sources not ready BUT CONFIGURED (init.sls) for this! # Something went wrong - apt-sources not ready BUT CONFIGURED (init.sls) for this!
......
...@@ -6,8 +6,8 @@ include: ...@@ -6,8 +6,8 @@ include:
- .pkgs - .pkgs
# control /apt/sources.list and apt.sources.list.d on ubuntu and debian # control /apt/sources.list and apt.sources.list.d on ubuntu and debian
{% if grains['os'] == 'Debian' and grains['oscodename'] in ['squeeze', 'wheezy', 'jessie', 'stretch'] {% if grains['os'] == 'Debian' and grains['oscodename'] in ['squeeze', 'wheezy', 'jessie', 'stretch', 'buster']
or grains['os'] == 'Ubuntu' and grains['oscodename'] in ['trusty'] %} or grains['os'] == 'Ubuntu' and grains['oscodename'] in ['trusty', 'xenial', 'bionic'] %}
hsh_apt_sources_list: hsh_apt_sources_list:
file.managed: file.managed:
- name: /etc/apt/sources.list - name: /etc/apt/sources.list
......
...@@ -11,4 +11,3 @@ hshbase: ...@@ -11,4 +11,3 @@ hshbase:
system: en_US.UTF-8 system: en_US.UTF-8
present: present:
- de_DE.UTF-8 - de_DE.UTF-8
snmpd: True
...@@ -4,10 +4,19 @@ ...@@ -4,10 +4,19 @@
# For Debian/Ubuntu >6, wheezy packages have different names. # For Debian/Ubuntu >6, wheezy packages have different names.
# Also, wheezy packages don't work, so they still get vmware stuff! # Also, wheezy packages don't work, so they still get vmware stuff!
{% if grains['os'] in ['Debian', 'Ubuntu'] and grains['oscodename'] not in ['squeeze', 'wheezy'] %} # this block can be removed when everything is > debian 9
{% if grains['os'] in ['Debian', 'Ubuntu'] and grains['oscodename'] not in ['squeeze', 'wheezy', 'stretch', 'buster', 'bionic'] %}
hsh_openvmtools: hsh_openvmtools:
pkg.installed: pkg.installed:
- pkgs: [open-vm-tools, open-vm-tools-dkms] - pkgs: [open-vm-tools, open-vm-tools-dkms]
- refresh: True
# Debian buster does not include the dkms package anymore
{% elif grains['os'] in ['Debian', 'Ubuntu'] and grains['oscodename'] in ['buster', 'bionic'] %}
hsh_openvmtools:
pkg.installed:
- pkgs: [open-vm-tools]
- refresh: True
{% elif grains['os'] == 'FreeBSD' %} {% elif grains['os'] == 'FreeBSD' %}
hsh_openvmtools: hsh_openvmtools:
......
# Always install these packages # Always install these packages
{% if grains['os'] == 'Debian' or grains['os'] == 'Ubuntu' %} {% if grains['os'] in ['Debian', 'Ubuntu'] %}
hsh_common_packages_salt: hsh_common_packages_salt:
pkg.installed: pkg.installed:
- pkgs: - pkgs:
...@@ -9,6 +9,7 @@ hsh_common_packages_salt: ...@@ -9,6 +9,7 @@ hsh_common_packages_salt:
- etckeeper - etckeeper
- lsof - lsof
- traceroute - traceroute
- vim
{% elif grains['os'] == 'FreeBSD' %} {% elif grains['os'] == 'FreeBSD' %}
hsh_common_packages_salt: hsh_common_packages_salt:
......
{% from "hshbase/map.jinja" import hshbase with context %} {% from "hshbase/map.jinja" import hshbase with context %}
{% if grains['os'] in ('Debian', 'Ubuntu') %} {# We stick with ntpd for debian boxes before buster and for ubuntu boxes before bionic #}
{% if (grains['os'] == 'Debian' and grains['osmajorrelease'] < 10) or (grains['os'] == 'Ubuntu' and grains['osmajorrelease'] < 18) %}
ntp: ntp:
pkg.installed pkg.installed:
- refresh: True
/etc/ntp.conf: /etc/ntp.conf:
file.managed: file.managed:
...@@ -13,7 +15,6 @@ ntp: ...@@ -13,7 +15,6 @@ ntp:
- require: - require:
- pkg: ntp - pkg: ntp
{% if grains['os'] == 'Debian' and grains['oscodename'] != 'jessie' %}
hsh_ntp_service_running: hsh_ntp_service_running:
service.running: service.running:
- name: ntp - name: ntp
...@@ -25,17 +26,30 @@ hsh_ntp_service_running: ...@@ -25,17 +26,30 @@ hsh_ntp_service_running:
- file: /etc/ntp.conf - file: /etc/ntp.conf
- pkg: ntp - pkg: ntp
{% else %} {# The new boxes ensure the old stuff is away and the rest is configured in the interfaces section #}
{# We are not waiting for ntp here! Read this:\n* https://github.com/systemd/systemd/issues/937\n* https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=635752 #} {% elif (grains['os'] == 'Debian' and grains['osmajorrelease'] >= 10) or grains['os'] == 'Ubuntu' and grains['osmajorrelease'] >= 18 %}
{% endif %} ntp:
pkg.purged
hsh_server_timezone: /etc/ntp.conf:
timezone.system: file.absent:
- name: {{ hshbase.time.zone }} - require:
- pkg: ntp
hsh_ntp_service_not_running:
service.disabled:
- name: ntp
- require:
- file: /etc/ntp.conf
- pkg: ntp
{% elif grains['os'] == 'FreeBSD' %} {% elif grains['os'] == 'FreeBSD' %}
{# TODO: Manage /etc/ntp.conf file. #} {# TODO: Manage /etc/ntp.conf file. #}
{% endif %} {% endif %}
hsh_server_timezone:
timezone.system:
- name: {{ hshbase.time.zone }}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment