Преглед изворни кода

setting default path for resolver configuration file

tags/v0.1
Arnold Bechtoldt пре 10 година
родитељ
комит
c24e211386
4 измењених фајлова са 7 додато и 13 уклоњено
  1. +2
    -11
      network/defaults.yaml
  2. +2
    -0
      network/hosts.sls
  3. +3
    -1
      network/resolver.sls
  4. +0
    -1
      network/routes.sls

+ 2
- 11
network/defaults.yaml Прегледај датотеку

@@ -1,4 +1,3 @@
# vim: sts=2 ts=2 sw=2 et ai
{% load_yaml as rawmap %}
Debian:
interfaces:
@@ -36,12 +35,8 @@ Debian:
- name: lo
proto: loopback
type: eth
resolver:
values:
path: /etc/resolv.conf
resolver: {}
hosts:
values:
path: /etc/hosts
def_entries:
- name: localhost
ip: 127.0.0.1
@@ -102,12 +97,8 @@ RedHat:
# type: eth
# netmask: 255.0.0.0
# network: 127.0.0.0
resolver:
values:
path: /etc/resolv.conf
resolver: {}
hosts:
values:
path: /etc/hosts
def_entries:
- name: localhost
ip: 127.0.0.1

+ 2
- 0
network/hosts.sls Прегледај датотеку

@@ -1,3 +1,5 @@
#!jinja|yaml

{% from "network/defaults.yaml" import rawmap with context %}
{% set datamap = salt['grains.filter_by'](rawmap, merge=salt['pillar.get']('network:lookup')) %}


+ 3
- 1
network/resolver.sls Прегледај датотеку

@@ -1,10 +1,12 @@
#!jinja|yaml

{% from "network/defaults.yaml" import rawmap with context %}
{% set datamap = salt['grains.filter_by'](rawmap, merge=salt['pillar.get']('network:lookup')) %}

resolver:
file:
- managed
- name: {{ datamap['resolver']['values']['path'] }}
- name: {{ datamap.resolver.path|default('/etc/resolv.conf') }}
- mode: 644
- user: root
- group: root

+ 0
- 1
network/routes.sls Прегледај датотеку

@@ -1,5 +1,4 @@
#!jinja|yaml
# vim: sts=2 ts=2 sw=2 et ai

{% from "network/defaults.yaml" import rawmap with context %}
{% set datamap = salt['grains.filter_by'](rawmap, merge=salt['pillar.get']('network')) %}

Loading…
Откажи
Сачувај