--- /dev/null
+#!/bin/sh
+
+# Don't overwrite /etc/resolv.conf
+make_resolv_conf() {
+ :
+}
--- /dev/null
+{%- set domain = salt['pillar.get']('resolver:domain', 'uhu-banane.de') -%}
+{%- set search = salt['pillar.get']('resolver:search', ['uhu-banane.de', 'brehm-online.com']) -%}
+{%- set def_ns = salt['pillar.get']('resolver:default-nameserver', ['8.8.8.8', '8.8.4.4']) -%}
+{%- set nameservers = salt['pillar.get']('resolver:nameserver', def_ns) -%}
+domain {{ domain }}
+search {{ search|join(' ') }}
+{%- for ns in nameservers %}
+nameserver {{ ns }}
+{%- endfor %}
common-pkgs:
pkg.installed:
- pkgs:
+ - ack-grep
- acl
- apticron
- aptitude
--- /dev/null
+
+symlinked-resolv-conf:
+ cmd.run:
+ - name: rm -f /etc/resolv.conf
+ - onlyif:
+ - test -L /etc/resolv.conf
+
+/etc/dhcp/dhclient-enter-hooks.d:
+ file.directory:
+ - user: root
+ - group: root
+ - dir_mode: 755
+ - file_mode: 644
+ - makedirs: True
+
+/etc/dhcp/dhclient-enter-hooks.d/nodnsupdate:
+ file.managed:
+ - source: salt://basic/files/dhcp-nodnsupdate
+ - user: root
+ - group: root
+ - mode: 644
+ - template: jinja
+ - backup: minion
+ - require:
+ - file: /etc/dhcp/dhclient-enter-hooks.d
+
+
+/etc/resolv.conf:
+ file.managed:
+ - source: salt://basic/files/resolv.conf
+ - user: root
+ - group: root
+ - mode: 644
+ - template: jinja
+ - backup: minion
+ - require:
+ - cmd: symlinked-resolv-conf
+ - file: /etc/dhcp/dhclient-enter-hooks.d/nodnsupdate
'ns\d+.uhu-banane.de':
- match: pcre
- debian.apt
+ - basic.resolver
- basic.editors
- basic.localization
- debian.sysvinit