feat(nsd): configure NSD based on TOFS pattern
This commit is contained in:
parent
a5a8ec4113
commit
eb51237183
@ -18,8 +18,14 @@ nsd-formula
|
||||
:scale: 100%
|
||||
:target: https://github.com/pre-commit/pre-commit
|
||||
|
||||
A SaltStack formula that is empty. It has dummy content to help with a quick
|
||||
start on a new formula and it serves as a style guide.
|
||||
A SaltStack formula that manages NSD.
|
||||
|
||||
It intentionally provides only minimalistic configuration.
|
||||
Use the `TOFS pattern<https://template-formula.readthedocs.io/en/latest/TOFS_pattern.html>` to alter the configuration to your needs.
|
||||
|
||||
You'll need to write the zone files yourself, obviously.
|
||||
This formula will tell NSD to compile them into it's DB and provide a configuration file for you to include.
|
||||
|
||||
|
||||
.. contents:: **Table of Contents**
|
||||
:depth: 1
|
||||
|
@ -489,7 +489,7 @@ Here is an example based on `template-formula/nsd/config/file.sls`_:
|
||||
nsd-config-file-file-managed:
|
||||
file.managed:
|
||||
- name: {{ nsd.config }}
|
||||
- source: {{ files_switch(['example.tmpl'],
|
||||
- source: {{ files_switch(['nsd.conf'],
|
||||
lookup='nsd-config-file-file-managed'
|
||||
)
|
||||
}}
|
||||
|
34
nsd/config/config_files.sls
Normal file
34
nsd/config/config_files.sls
Normal file
@ -0,0 +1,34 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# vim: ft=sls
|
||||
|
||||
{#- Get the `tplroot` from `tpldir` #}
|
||||
{%- set tplroot = tpldir.split('/')[0] %}
|
||||
{%- set sls_package_install = tplroot ~ '.package.install' %}
|
||||
{%- from tplroot ~ "/map.jinja" import mapdata as nsd with context %}
|
||||
{%- from tplroot ~ "/libtofs.jinja" import files_switch with context %}
|
||||
|
||||
{%- for name, template in nsd.get('config_files', {}).items() %}
|
||||
|
||||
{%- set identifier = 'nsd-config-config_files-file-managed-'+name %}
|
||||
|
||||
"{{ identifier }}":
|
||||
file.managed:
|
||||
- name: "{{ nsd.config_include_dir }}/{{ name }}.conf"
|
||||
- source: {{ files_switch([template+'.conf', template+'.conf.jinja'],
|
||||
lookup=identifier
|
||||
)
|
||||
}}
|
||||
- mode: 644
|
||||
- user: root
|
||||
- group: {{ nsd.rootgroup }}
|
||||
- makedirs: True
|
||||
- template: jinja
|
||||
- require:
|
||||
- file: nsd-config-include-file-directory
|
||||
- require_in:
|
||||
- file: nsd-config-file-file-managed
|
||||
- context:
|
||||
nsd: {{ nsd | json }}
|
||||
- check_cmd: nsd-checkconf
|
||||
|
||||
{%- endfor %}
|
@ -13,7 +13,7 @@ include:
|
||||
nsd-config-file-file-managed:
|
||||
file.managed:
|
||||
- name: {{ nsd.config }}
|
||||
- source: {{ files_switch(['example.tmpl'],
|
||||
- source: {{ files_switch(['nsd.conf', 'nsd.conf.jinja'],
|
||||
lookup='nsd-config-file-file-managed'
|
||||
)
|
||||
}}
|
||||
@ -24,5 +24,7 @@ nsd-config-file-file-managed:
|
||||
- template: jinja
|
||||
- require:
|
||||
- sls: {{ sls_package_install }}
|
||||
- file: nsd-config-include-file-directory
|
||||
- context:
|
||||
nsd: {{ nsd | json }}
|
||||
- check_cmd: nsd-checkconf
|
||||
|
13
nsd/config/include.sls
Normal file
13
nsd/config/include.sls
Normal file
@ -0,0 +1,13 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# vim: ft=sls
|
||||
|
||||
{#- Get the `tplroot` from `tpldir` #}
|
||||
{%- set tplroot = tpldir.split('/')[0] %}
|
||||
{%- set sls_package_install = tplroot ~ '.package.install' %}
|
||||
{%- from tplroot ~ "/map.jinja" import mapdata as nsd with context %}
|
||||
{%- from tplroot ~ "/libtofs.jinja" import files_switch with context %}
|
||||
|
||||
nsd-config-include-file-directory:
|
||||
file.directory:
|
||||
- name: "{{ nsd.config_include_dir }}"
|
||||
- makedirs: true
|
@ -2,4 +2,6 @@
|
||||
# vim: ft=sls
|
||||
|
||||
include:
|
||||
- .include
|
||||
- .config_files
|
||||
- .file
|
||||
|
@ -1,6 +0,0 @@
|
||||
########################################################################
|
||||
# File managed by Salt at <{{ source }}>.
|
||||
# Your changes will be overwritten.
|
||||
########################################################################
|
||||
|
||||
This is an example file from SaltStack template-formula.
|
@ -1,11 +0,0 @@
|
||||
########################################################################
|
||||
# File managed by Salt at <{{ source }}>.
|
||||
# Your changes will be overwritten.
|
||||
########################################################################
|
||||
|
||||
This is another example file from SaltStack template-formula.
|
||||
|
||||
# This is here for testing purposes
|
||||
{{ nsd | json }}
|
||||
|
||||
winner of the merge: {{ nsd['winner'] }}
|
18
nsd/files/default/local-nsd-for-unbound.conf.jinja
Normal file
18
nsd/files/default/local-nsd-for-unbound.conf.jinja
Normal file
@ -0,0 +1,18 @@
|
||||
########################################################################
|
||||
# File managed by Salt at <{{ source }}>.
|
||||
# Your changes will be overwritten.
|
||||
########################################################################
|
||||
|
||||
# This is just a minimal example for using NSD together with a locally
|
||||
# running unbound resolver. (See unbound-forula)
|
||||
# If you need different configuration, use the TOFS pattern!
|
||||
|
||||
# (We're using IPv4 here, because the Kitchen CI configuration had no IPv6 at the time of development.)
|
||||
|
||||
server:
|
||||
server-count: 1
|
||||
ip-address: 127.0.0.1
|
||||
port: 53530
|
||||
|
||||
remote-control:
|
||||
control-interface: 127.0.0.1
|
20
nsd/files/default/nsd.conf.jinja
Normal file
20
nsd/files/default/nsd.conf.jinja
Normal file
@ -0,0 +1,20 @@
|
||||
########################################################################
|
||||
# File managed by Salt at <{{ source }}>.
|
||||
# Your changes will be overwritten.
|
||||
########################################################################
|
||||
|
||||
|
||||
# All configuration is loaded from here:
|
||||
include: "{{ nsd.config_include_dir }}/{{ nsd.config_include_glob }}"
|
||||
|
||||
|
||||
########################################################################
|
||||
#
|
||||
# This section is for testing only. You can safely ignore it and delete
|
||||
# it from your templates.
|
||||
#
|
||||
# winner of the merge: {{ nsd.winner }}
|
||||
#
|
||||
# {{ nsd | json}}
|
||||
#
|
||||
########################################################################
|
@ -7,7 +7,9 @@ values:
|
||||
pkg:
|
||||
name: nsd
|
||||
rootgroup: root
|
||||
config: '/etc/nsd'
|
||||
config: '/etc/nsd/nsd.conf'
|
||||
config_include_dir: '/etc/nsd/nsd.conf.d'
|
||||
config_include_glob: '*.conf'
|
||||
service:
|
||||
name: nsd
|
||||
# Just here for testing
|
||||
|
@ -11,9 +11,5 @@
|
||||
# you can remove this file or provide at least an empty dict, e.g.
|
||||
# values: {}
|
||||
---
|
||||
values:
|
||||
pkg:
|
||||
name: nsd-fedora
|
||||
service:
|
||||
name: service-fedora
|
||||
values: {}
|
||||
...
|
||||
|
@ -11,8 +11,5 @@
|
||||
# you can remove this file or provide at least an empty dict, e.g.
|
||||
# values: {}
|
||||
---
|
||||
values:
|
||||
pkg:
|
||||
name: nsd-ubuntu
|
||||
config: /etc/nsd.d/custom-ubuntu.conf
|
||||
values: {}
|
||||
...
|
||||
|
@ -11,9 +11,5 @@
|
||||
# you can remove this file or provide at least an empty dict, e.g.
|
||||
# values: {}
|
||||
---
|
||||
values:
|
||||
pkg:
|
||||
name: nsd-arch
|
||||
service:
|
||||
name: service-arch
|
||||
values: {}
|
||||
...
|
||||
|
@ -11,8 +11,5 @@
|
||||
# you can remove this file or provide at least an empty dict, e.g.
|
||||
# values: {}
|
||||
---
|
||||
values:
|
||||
pkg:
|
||||
name: nsd-debian
|
||||
config: /etc/nsd.d/custom.conf
|
||||
values: {}
|
||||
...
|
||||
|
@ -13,4 +13,6 @@
|
||||
---
|
||||
values:
|
||||
rootgroup: wheel
|
||||
config: '/usr/local/etc/nsd/nsd.conf'
|
||||
config_include_dir: '/usr/local/etc/nsd/nsd.conf.d'
|
||||
...
|
||||
|
@ -11,7 +11,5 @@
|
||||
# you can remove this file or provide at least an empty dict, e.g.
|
||||
# values: {}
|
||||
---
|
||||
values:
|
||||
pkg:
|
||||
name: nsd-gentoo
|
||||
values: {}
|
||||
...
|
||||
|
@ -11,8 +11,5 @@
|
||||
# you can remove this file or provide at least an empty dict, e.g.
|
||||
# values: {}
|
||||
---
|
||||
values:
|
||||
pkg:
|
||||
name: nsd-redhat
|
||||
config: /etc/nsd.conf
|
||||
values: {}
|
||||
...
|
||||
|
@ -11,7 +11,5 @@
|
||||
# you can remove this file or provide at least an empty dict, e.g.
|
||||
# values: {}
|
||||
---
|
||||
values:
|
||||
pkg:
|
||||
name: nsd-suse
|
||||
values: {}
|
||||
...
|
||||
|
@ -11,8 +11,5 @@
|
||||
# you can remove this file or provide at least an empty dict, e.g.
|
||||
# values: {}
|
||||
---
|
||||
values:
|
||||
pkg:
|
||||
name: nsd-centos-6
|
||||
config: /etc/nsd.d/custom-centos-6.conf
|
||||
values: {}
|
||||
...
|
||||
|
@ -11,6 +11,5 @@
|
||||
# you can remove this file or provide at least an empty dict, e.g.
|
||||
# values: {}
|
||||
---
|
||||
values:
|
||||
config: /etc/nsd.d/custom-ubuntu-18.04.conf
|
||||
values: {}
|
||||
...
|
||||
|
@ -8,14 +8,17 @@ nsd:
|
||||
winner: lookup
|
||||
added_in_lookup: lookup_value
|
||||
|
||||
# Using bash package and udev service as an example. This allows us to
|
||||
# test the template formula itself. You should set these parameters to
|
||||
# examples that make sense in the contexto of the formula you're writing.
|
||||
pkg:
|
||||
name: bash
|
||||
service:
|
||||
name: systemd-journald
|
||||
config: /etc/template-formula.conf
|
||||
# pkg:
|
||||
# name: nsd
|
||||
# service:
|
||||
# name: nsd
|
||||
# config: /etc/nsd/nsd.conf
|
||||
# config_include_dir: /etc/nsd/nsd.conf.d
|
||||
# config_include_glob: *.conf
|
||||
|
||||
# Configuration is separated into several files which have their own templates
|
||||
config_files:
|
||||
10-server: local-nsd-for-unbound
|
||||
|
||||
tofs:
|
||||
# The files_switch key serves as a selector for alternative
|
||||
@ -48,7 +51,7 @@ nsd:
|
||||
# For testing purposes
|
||||
source_files:
|
||||
nsd-config-file-file-managed:
|
||||
- 'example.tmpl.jinja'
|
||||
- 'nsd.conf.jinja'
|
||||
|
||||
# Just for testing purposes
|
||||
winner: pillar
|
||||
|
@ -3,20 +3,20 @@
|
||||
control 'nsd.config.file' do
|
||||
title 'Verify the configuration file'
|
||||
|
||||
describe file('/etc/template-formula.conf') do
|
||||
describe file('/etc/nsd/nsd.conf') do
|
||||
it { should be_file }
|
||||
it { should be_owned_by 'root' }
|
||||
it { should be_grouped_into 'root' }
|
||||
its('mode') { should cmp '0644' }
|
||||
its('content') do
|
||||
should include(
|
||||
'This is another example file from SaltStack template-formula.'
|
||||
'Your changes will be overwritten.'
|
||||
)
|
||||
end
|
||||
its('content') { should include '"added_in_pillar": "pillar_value"' }
|
||||
its('content') { should include '"added_in_defaults": "defaults_value"' }
|
||||
its('content') { should include '"added_in_lookup": "lookup_value"' }
|
||||
its('content') { should include '"config": "/etc/template-formula.conf"' }
|
||||
its('content') { should include '"config": "/etc/nsd/nsd.conf"' }
|
||||
its('content') { should include '"lookup": {"added_in_lookup": "lookup_value",' }
|
||||
its('content') { should include '"pkg": {"name": "' }
|
||||
its('content') { should include '"service": {"name": "' }
|
||||
@ -26,13 +26,19 @@ control 'nsd.config.file' do
|
||||
should include(
|
||||
'"tofs": {"files_switch": ["any/path/can/be/used/here", "id", '\
|
||||
'"roles", "osfinger", "os", "os_family"], "source_files": '\
|
||||
'{"nsd-config-file-file-managed": ["example.tmpl.jinja"]}'
|
||||
'{"nsd-config-file-file-managed": ["nsd.conf.jinja"]}'
|
||||
)
|
||||
# rubocop:enable Layout/LineLength
|
||||
# rubocop:enable Lint/RedundantCopDisableDirective
|
||||
end
|
||||
its('content') { should include '"arch": "amd64"' }
|
||||
its('content') { should include '"winner": "pillar"}' }
|
||||
its('content') { should include '"winner": "pillar"' }
|
||||
its('content') { should include 'winner of the merge: pillar' }
|
||||
end
|
||||
|
||||
describe file('/etc/nsd/nsd.conf.d') do
|
||||
it { should be_directory }
|
||||
it { should be_owned_by 'root' }
|
||||
it { should be_grouped_into 'root' }
|
||||
end
|
||||
end
|
||||
|
@ -12,7 +12,7 @@ control 'nsd.service.running' do
|
||||
when 'centos-6', 'amazonlinux-1'
|
||||
'crond'
|
||||
else
|
||||
'systemd-journald'
|
||||
'nsd'
|
||||
end
|
||||
|
||||
describe service(service_name) do
|
||||
|
@ -6,7 +6,11 @@ values:
|
||||
added_in_lookup: lookup_value
|
||||
added_in_pillar: pillar_value
|
||||
arch: amd64
|
||||
config: /etc/template-formula.conf
|
||||
config: /etc/nsd/nsd.conf
|
||||
config_files:
|
||||
10-server: local-nsd-for-unbound
|
||||
config_include_dir: "/etc/nsd/nsd.conf.d"
|
||||
config_include_glob: "*.conf"
|
||||
lookup:
|
||||
added_in_lookup: lookup_value
|
||||
master: template-master
|
||||
@ -36,5 +40,5 @@ values:
|
||||
- os_family
|
||||
source_files:
|
||||
nsd-config-file-file-managed:
|
||||
- example.tmpl.jinja
|
||||
- nsd.conf.jinja
|
||||
winner: pillar
|
||||
|
@ -6,7 +6,11 @@ values:
|
||||
added_in_lookup: lookup_value
|
||||
added_in_pillar: pillar_value
|
||||
arch: amd64
|
||||
config: /etc/template-formula.conf
|
||||
config: /etc/nsd/nsd.conf
|
||||
config_files:
|
||||
10-server: local-nsd-for-unbound
|
||||
config_include_dir: "/etc/nsd/nsd.conf.d"
|
||||
config_include_glob: "*.conf"
|
||||
lookup:
|
||||
added_in_lookup: lookup_value
|
||||
master: template-master
|
||||
@ -22,10 +26,10 @@ values:
|
||||
- Y:G@id
|
||||
master: template-master
|
||||
pkg:
|
||||
name: bash
|
||||
name: nsd
|
||||
rootgroup: root
|
||||
service:
|
||||
name: systemd-journald
|
||||
name: nsd
|
||||
tofs:
|
||||
files_switch:
|
||||
- any/path/can/be/used/here
|
||||
@ -36,5 +40,5 @@ values:
|
||||
- os_family
|
||||
source_files:
|
||||
nsd-config-file-file-managed:
|
||||
- example.tmpl.jinja
|
||||
- nsd.conf.jinja
|
||||
winner: pillar
|
||||
|
@ -6,7 +6,11 @@ values:
|
||||
added_in_lookup: lookup_value
|
||||
added_in_pillar: pillar_value
|
||||
arch: amd64
|
||||
config: /etc/template-formula.conf
|
||||
config: /etc/nsd/nsd.conf
|
||||
config_files:
|
||||
10-server: local-nsd-for-unbound
|
||||
config_include_dir: "/etc/nsd/nsd.conf.d"
|
||||
config_include_glob: "*.conf"
|
||||
lookup:
|
||||
added_in_lookup: lookup_value
|
||||
master: template-master
|
||||
@ -22,10 +26,10 @@ values:
|
||||
- Y:G@id
|
||||
master: template-master
|
||||
pkg:
|
||||
name: bash
|
||||
name: nsd
|
||||
rootgroup: root
|
||||
service:
|
||||
name: systemd-journald
|
||||
name: nsd
|
||||
tofs:
|
||||
files_switch:
|
||||
- any/path/can/be/used/here
|
||||
@ -36,5 +40,5 @@ values:
|
||||
- os_family
|
||||
source_files:
|
||||
nsd-config-file-file-managed:
|
||||
- example.tmpl.jinja
|
||||
- nsd.conf.jinja
|
||||
winner: pillar
|
||||
|
@ -6,7 +6,11 @@ values:
|
||||
added_in_lookup: lookup_value
|
||||
added_in_pillar: pillar_value
|
||||
arch: amd64
|
||||
config: /etc/template-formula.conf
|
||||
config: /etc/nsd/nsd.conf
|
||||
config_files:
|
||||
10-server: local-nsd-for-unbound
|
||||
config_include_dir: "/etc/nsd/nsd.conf.d"
|
||||
config_include_glob: "*.conf"
|
||||
lookup:
|
||||
added_in_lookup: lookup_value
|
||||
master: template-master
|
||||
@ -36,5 +40,5 @@ values:
|
||||
- os_family
|
||||
source_files:
|
||||
nsd-config-file-file-managed:
|
||||
- example.tmpl.jinja
|
||||
- nsd.conf.jinja
|
||||
winner: pillar
|
||||
|
@ -6,7 +6,11 @@ values:
|
||||
added_in_lookup: lookup_value
|
||||
added_in_pillar: pillar_value
|
||||
arch: amd64
|
||||
config: /etc/template-formula.conf
|
||||
config: /etc/nsd/nsd.conf
|
||||
config_files:
|
||||
10-server: local-nsd-for-unbound
|
||||
config_include_dir: "/etc/nsd/nsd.conf.d"
|
||||
config_include_glob: "*.conf"
|
||||
lookup:
|
||||
added_in_lookup: lookup_value
|
||||
master: template-master
|
||||
@ -22,10 +26,10 @@ values:
|
||||
- Y:G@id
|
||||
master: template-master
|
||||
pkg:
|
||||
name: bash
|
||||
name: nsd
|
||||
rootgroup: root
|
||||
service:
|
||||
name: systemd-journald
|
||||
name: nsd
|
||||
tofs:
|
||||
files_switch:
|
||||
- any/path/can/be/used/here
|
||||
@ -36,5 +40,5 @@ values:
|
||||
- os_family
|
||||
source_files:
|
||||
nsd-config-file-file-managed:
|
||||
- example.tmpl.jinja
|
||||
- nsd.conf.jinja
|
||||
winner: pillar
|
||||
|
@ -6,7 +6,11 @@ values:
|
||||
added_in_lookup: lookup_value
|
||||
added_in_pillar: pillar_value
|
||||
arch: amd64
|
||||
config: /etc/template-formula.conf
|
||||
config: /etc/nsd/nsd.conf
|
||||
config_files:
|
||||
10-server: local-nsd-for-unbound
|
||||
config_include_dir: "/etc/nsd/nsd.conf.d"
|
||||
config_include_glob: "*.conf"
|
||||
lookup:
|
||||
added_in_lookup: lookup_value
|
||||
master: template-master
|
||||
@ -22,10 +26,10 @@ values:
|
||||
- Y:G@id
|
||||
master: template-master
|
||||
pkg:
|
||||
name: bash
|
||||
name: nsd
|
||||
rootgroup: root
|
||||
service:
|
||||
name: systemd-journald
|
||||
name: nsd
|
||||
tofs:
|
||||
files_switch:
|
||||
- any/path/can/be/used/here
|
||||
@ -36,5 +40,5 @@ values:
|
||||
- os_family
|
||||
source_files:
|
||||
nsd-config-file-file-managed:
|
||||
- example.tmpl.jinja
|
||||
- nsd.conf.jinja
|
||||
winner: pillar
|
||||
|
@ -6,7 +6,11 @@ values:
|
||||
added_in_lookup: lookup_value
|
||||
added_in_pillar: pillar_value
|
||||
arch: amd64
|
||||
config: /etc/template-formula.conf
|
||||
config: /etc/nsd/nsd.conf
|
||||
config_files:
|
||||
10-server: local-nsd-for-unbound
|
||||
config_include_dir: "/etc/nsd/nsd.conf.d"
|
||||
config_include_glob: "*.conf"
|
||||
lookup:
|
||||
added_in_lookup: lookup_value
|
||||
master: template-master
|
||||
@ -22,10 +26,10 @@ values:
|
||||
- Y:G@id
|
||||
master: template-master
|
||||
pkg:
|
||||
name: bash
|
||||
name: nsd
|
||||
rootgroup: root
|
||||
service:
|
||||
name: systemd-journald
|
||||
name: nsd
|
||||
tofs:
|
||||
files_switch:
|
||||
- any/path/can/be/used/here
|
||||
@ -36,5 +40,5 @@ values:
|
||||
- os_family
|
||||
source_files:
|
||||
nsd-config-file-file-managed:
|
||||
- example.tmpl.jinja
|
||||
- nsd.conf.jinja
|
||||
winner: pillar
|
||||
|
@ -6,7 +6,11 @@ values:
|
||||
added_in_lookup: lookup_value
|
||||
added_in_pillar: pillar_value
|
||||
arch: amd64
|
||||
config: /etc/template-formula.conf
|
||||
config: /etc/nsd/nsd.conf
|
||||
config_files:
|
||||
10-server: local-nsd-for-unbound
|
||||
config_include_dir: "/etc/nsd/nsd.conf.d"
|
||||
config_include_glob: "*.conf"
|
||||
lookup:
|
||||
added_in_lookup: lookup_value
|
||||
master: template-master
|
||||
@ -22,10 +26,10 @@ values:
|
||||
- Y:G@id
|
||||
master: template-master
|
||||
pkg:
|
||||
name: bash
|
||||
name: nsd
|
||||
rootgroup: root
|
||||
service:
|
||||
name: systemd-journald
|
||||
name: nsd
|
||||
tofs:
|
||||
files_switch:
|
||||
- any/path/can/be/used/here
|
||||
@ -36,5 +40,5 @@ values:
|
||||
- os_family
|
||||
source_files:
|
||||
nsd-config-file-file-managed:
|
||||
- example.tmpl.jinja
|
||||
- nsd.conf.jinja
|
||||
winner: pillar
|
||||
|
@ -6,7 +6,11 @@ values:
|
||||
added_in_lookup: lookup_value
|
||||
added_in_pillar: pillar_value
|
||||
arch: amd64
|
||||
config: /etc/template-formula.conf
|
||||
config: /etc/nsd/nsd.conf
|
||||
config_files:
|
||||
10-server: local-nsd-for-unbound
|
||||
config_include_dir: "/etc/nsd/nsd.conf.d"
|
||||
config_include_glob: "*.conf"
|
||||
lookup:
|
||||
added_in_lookup: lookup_value
|
||||
master: template-master
|
||||
@ -22,10 +26,10 @@ values:
|
||||
- Y:G@id
|
||||
master: template-master
|
||||
pkg:
|
||||
name: bash
|
||||
name: nsd
|
||||
rootgroup: root
|
||||
service:
|
||||
name: systemd-journald
|
||||
name: nsd
|
||||
tofs:
|
||||
files_switch:
|
||||
- any/path/can/be/used/here
|
||||
@ -36,5 +40,5 @@ values:
|
||||
- os_family
|
||||
source_files:
|
||||
nsd-config-file-file-managed:
|
||||
- example.tmpl.jinja
|
||||
- nsd.conf.jinja
|
||||
winner: pillar
|
||||
|
@ -6,7 +6,11 @@ values:
|
||||
added_in_lookup: lookup_value
|
||||
added_in_pillar: pillar_value
|
||||
arch: amd64
|
||||
config: /etc/template-formula.conf
|
||||
config: /etc/nsd/nsd.conf
|
||||
config_files:
|
||||
10-server: local-nsd-for-unbound
|
||||
config_include_dir: "/etc/nsd/nsd.conf.d"
|
||||
config_include_glob: "*.conf"
|
||||
lookup:
|
||||
added_in_lookup: lookup_value
|
||||
master: template-master
|
||||
@ -22,10 +26,10 @@ values:
|
||||
- Y:G@id
|
||||
master: template-master
|
||||
pkg:
|
||||
name: bash
|
||||
name: nsd
|
||||
rootgroup: root
|
||||
service:
|
||||
name: systemd-journald
|
||||
name: nsd
|
||||
tofs:
|
||||
files_switch:
|
||||
- any/path/can/be/used/here
|
||||
@ -36,5 +40,5 @@ values:
|
||||
- os_family
|
||||
source_files:
|
||||
nsd-config-file-file-managed:
|
||||
- example.tmpl.jinja
|
||||
- nsd.conf.jinja
|
||||
winner: pillar
|
||||
|
@ -6,7 +6,11 @@ values:
|
||||
added_in_lookup: lookup_value
|
||||
added_in_pillar: pillar_value
|
||||
arch: amd64
|
||||
config: /etc/template-formula.conf
|
||||
config: /etc/nsd/nsd.conf
|
||||
config_files:
|
||||
10-server: local-nsd-for-unbound
|
||||
config_include_dir: "/etc/nsd/nsd.conf.d"
|
||||
config_include_glob: "*.conf"
|
||||
lookup:
|
||||
added_in_lookup: lookup_value
|
||||
master: template-master
|
||||
@ -22,10 +26,10 @@ values:
|
||||
- Y:G@id
|
||||
master: template-master
|
||||
pkg:
|
||||
name: bash
|
||||
name: nsd
|
||||
rootgroup: root
|
||||
service:
|
||||
name: systemd-journald
|
||||
name: nsd
|
||||
tofs:
|
||||
files_switch:
|
||||
- any/path/can/be/used/here
|
||||
@ -36,5 +40,5 @@ values:
|
||||
- os_family
|
||||
source_files:
|
||||
nsd-config-file-file-managed:
|
||||
- example.tmpl.jinja
|
||||
- nsd.conf.jinja
|
||||
winner: pillar
|
||||
|
@ -6,7 +6,11 @@ values:
|
||||
added_in_lookup: lookup_value
|
||||
added_in_pillar: pillar_value
|
||||
arch: amd64
|
||||
config: /etc/template-formula.conf
|
||||
config: /etc/nsd/nsd.conf
|
||||
config_files:
|
||||
10-server: local-nsd-for-unbound
|
||||
config_include_dir: "/etc/nsd/nsd.conf.d"
|
||||
config_include_glob: "*.conf"
|
||||
lookup:
|
||||
added_in_lookup: lookup_value
|
||||
master: template-master
|
||||
@ -22,10 +26,10 @@ values:
|
||||
- Y:G@id
|
||||
master: template-master
|
||||
pkg:
|
||||
name: app-shells/bash
|
||||
name: nsd
|
||||
rootgroup: root
|
||||
service:
|
||||
name: systemd-journald
|
||||
name: nsd
|
||||
tofs:
|
||||
files_switch:
|
||||
- any/path/can/be/used/here
|
||||
@ -36,5 +40,5 @@ values:
|
||||
- os_family
|
||||
source_files:
|
||||
nsd-config-file-file-managed:
|
||||
- example.tmpl.jinja
|
||||
- nsd.conf.jinja
|
||||
winner: pillar
|
||||
|
@ -6,7 +6,11 @@ values:
|
||||
added_in_lookup: lookup_value
|
||||
added_in_pillar: pillar_value
|
||||
arch: amd64
|
||||
config: /etc/template-formula.conf
|
||||
config: /etc/nsd/nsd.conf
|
||||
config_files:
|
||||
10-server: local-nsd-for-unbound
|
||||
config_include_dir: "/etc/nsd/nsd.conf.d"
|
||||
config_include_glob: "*.conf"
|
||||
lookup:
|
||||
added_in_lookup: lookup_value
|
||||
master: template-master
|
||||
@ -22,10 +26,10 @@ values:
|
||||
- Y:G@id
|
||||
master: template-master
|
||||
pkg:
|
||||
name: app-shells/bash
|
||||
name: nsd
|
||||
rootgroup: root
|
||||
service:
|
||||
name: mtab
|
||||
name: nsd
|
||||
tofs:
|
||||
files_switch:
|
||||
- any/path/can/be/used/here
|
||||
@ -36,5 +40,5 @@ values:
|
||||
- os_family
|
||||
source_files:
|
||||
nsd-config-file-file-managed:
|
||||
- example.tmpl.jinja
|
||||
- nsd.conf.jinja
|
||||
winner: pillar
|
||||
|
@ -6,7 +6,11 @@ values:
|
||||
added_in_lookup: lookup_value
|
||||
added_in_pillar: pillar_value
|
||||
arch: amd64
|
||||
config: /etc/template-formula.conf
|
||||
config: /etc/nsd/nsd.conf
|
||||
config_files:
|
||||
10-server: local-nsd-for-unbound
|
||||
config_include_dir: "/etc/nsd/nsd.conf.d"
|
||||
config_include_glob: "*.conf"
|
||||
lookup:
|
||||
added_in_lookup: lookup_value
|
||||
master: template-master
|
||||
@ -22,10 +26,10 @@ values:
|
||||
- Y:G@id
|
||||
master: template-master
|
||||
pkg:
|
||||
name: bash
|
||||
name: nsd
|
||||
rootgroup: root
|
||||
service:
|
||||
name: systemd-journald
|
||||
name: nsd
|
||||
tofs:
|
||||
files_switch:
|
||||
- any/path/can/be/used/here
|
||||
@ -36,5 +40,5 @@ values:
|
||||
- os_family
|
||||
source_files:
|
||||
nsd-config-file-file-managed:
|
||||
- example.tmpl.jinja
|
||||
- nsd.conf.jinja
|
||||
winner: pillar
|
||||
|
@ -6,7 +6,11 @@ values:
|
||||
added_in_lookup: lookup_value
|
||||
added_in_pillar: pillar_value
|
||||
arch: amd64
|
||||
config: /etc/template-formula.conf
|
||||
config: /etc/nsd/nsd.conf
|
||||
config_files:
|
||||
10-server: local-nsd-for-unbound
|
||||
config_include_dir: "/etc/nsd/nsd.conf.d"
|
||||
config_include_glob: "*.conf"
|
||||
lookup:
|
||||
added_in_lookup: lookup_value
|
||||
master: template-master
|
||||
@ -22,10 +26,10 @@ values:
|
||||
- Y:G@id
|
||||
master: template-master
|
||||
pkg:
|
||||
name: bash
|
||||
name: nsd
|
||||
rootgroup: root
|
||||
service:
|
||||
name: systemd-journald
|
||||
name: nsd
|
||||
tofs:
|
||||
files_switch:
|
||||
- any/path/can/be/used/here
|
||||
@ -36,5 +40,5 @@ values:
|
||||
- os_family
|
||||
source_files:
|
||||
nsd-config-file-file-managed:
|
||||
- example.tmpl.jinja
|
||||
- nsd.conf.jinja
|
||||
winner: pillar
|
||||
|
@ -6,7 +6,11 @@ values:
|
||||
added_in_lookup: lookup_value
|
||||
added_in_pillar: pillar_value
|
||||
arch: amd64
|
||||
config: /etc/template-formula.conf
|
||||
config: /etc/nsd/nsd.conf
|
||||
config_files:
|
||||
10-server: local-nsd-for-unbound
|
||||
config_include_dir: "/etc/nsd/nsd.conf.d"
|
||||
config_include_glob: "*.conf"
|
||||
lookup:
|
||||
added_in_lookup: lookup_value
|
||||
master: template-master
|
||||
@ -22,10 +26,10 @@ values:
|
||||
- Y:G@id
|
||||
master: template-master
|
||||
pkg:
|
||||
name: bash
|
||||
name: nsd
|
||||
rootgroup: root
|
||||
service:
|
||||
name: systemd-journald
|
||||
name: nsd
|
||||
tofs:
|
||||
files_switch:
|
||||
- any/path/can/be/used/here
|
||||
@ -36,5 +40,5 @@ values:
|
||||
- os_family
|
||||
source_files:
|
||||
nsd-config-file-file-managed:
|
||||
- example.tmpl.jinja
|
||||
- nsd.conf.jinja
|
||||
winner: pillar
|
||||
|
@ -6,7 +6,11 @@ values:
|
||||
added_in_lookup: lookup_value
|
||||
added_in_pillar: pillar_value
|
||||
arch: amd64
|
||||
config: /etc/template-formula.conf
|
||||
config: /etc/nsd/nsd.conf
|
||||
config_files:
|
||||
10-server: local-nsd-for-unbound
|
||||
config_include_dir: "/etc/nsd/nsd.conf.d"
|
||||
config_include_glob: "*.conf"
|
||||
lookup:
|
||||
added_in_lookup: lookup_value
|
||||
master: template-master
|
||||
@ -22,10 +26,10 @@ values:
|
||||
- Y:G@id
|
||||
master: template-master
|
||||
pkg:
|
||||
name: bash
|
||||
name: nsd
|
||||
rootgroup: root
|
||||
service:
|
||||
name: systemd-journald
|
||||
name: nsd
|
||||
tofs:
|
||||
files_switch:
|
||||
- any/path/can/be/used/here
|
||||
@ -36,5 +40,5 @@ values:
|
||||
- os_family
|
||||
source_files:
|
||||
nsd-config-file-file-managed:
|
||||
- example.tmpl.jinja
|
||||
- nsd.conf.jinja
|
||||
winner: pillar
|
||||
|
@ -6,7 +6,11 @@ values:
|
||||
added_in_lookup: lookup_value
|
||||
added_in_pillar: pillar_value
|
||||
arch: amd64
|
||||
config: /etc/template-formula.conf
|
||||
config: /etc/nsd/nsd.conf
|
||||
config_files:
|
||||
10-server: local-nsd-for-unbound
|
||||
config_include_dir: "/etc/nsd/nsd.conf.d"
|
||||
config_include_glob: "*.conf"
|
||||
lookup:
|
||||
added_in_lookup: lookup_value
|
||||
master: template-master
|
||||
@ -22,10 +26,10 @@ values:
|
||||
- Y:G@id
|
||||
master: template-master
|
||||
pkg:
|
||||
name: bash
|
||||
name: nsd
|
||||
rootgroup: root
|
||||
service:
|
||||
name: systemd-journald
|
||||
name: nsd
|
||||
tofs:
|
||||
files_switch:
|
||||
- any/path/can/be/used/here
|
||||
@ -36,5 +40,5 @@ values:
|
||||
- os_family
|
||||
source_files:
|
||||
nsd-config-file-file-managed:
|
||||
- example.tmpl.jinja
|
||||
- nsd.conf.jinja
|
||||
winner: pillar
|
||||
|
@ -6,7 +6,11 @@ values:
|
||||
added_in_lookup: lookup_value
|
||||
added_in_pillar: pillar_value
|
||||
arch: amd64
|
||||
config: /etc/template-formula.conf
|
||||
config: /etc/nsd/nsd.conf
|
||||
config_files:
|
||||
10-server: local-nsd-for-unbound
|
||||
config_include_dir: "/etc/nsd/nsd.conf.d"
|
||||
config_include_glob: "*.conf"
|
||||
lookup:
|
||||
added_in_lookup: lookup_value
|
||||
master: template-master
|
||||
@ -22,10 +26,10 @@ values:
|
||||
- Y:G@id
|
||||
master: template-master
|
||||
pkg:
|
||||
name: bash
|
||||
name: nsd
|
||||
rootgroup: root
|
||||
service:
|
||||
name: systemd-journald
|
||||
name: nsd
|
||||
tofs:
|
||||
files_switch:
|
||||
- any/path/can/be/used/here
|
||||
@ -36,5 +40,5 @@ values:
|
||||
- os_family
|
||||
source_files:
|
||||
nsd-config-file-file-managed:
|
||||
- example.tmpl.jinja
|
||||
- nsd.conf.jinja
|
||||
winner: pillar
|
||||
|
@ -6,7 +6,11 @@ values:
|
||||
added_in_lookup: lookup_value
|
||||
added_in_pillar: pillar_value
|
||||
arch: amd64
|
||||
config: /etc/template-formula.conf
|
||||
config: /etc/nsd/nsd.conf
|
||||
config_files:
|
||||
10-server: local-nsd-for-unbound
|
||||
config_include_dir: "/etc/nsd/nsd.conf.d"
|
||||
config_include_glob: "*.conf"
|
||||
lookup:
|
||||
added_in_lookup: lookup_value
|
||||
master: template-master
|
||||
@ -22,10 +26,10 @@ values:
|
||||
- Y:G@id
|
||||
master: template-master
|
||||
pkg:
|
||||
name: bash
|
||||
name: nsd
|
||||
rootgroup: root
|
||||
service:
|
||||
name: systemd-journald
|
||||
name: nsd
|
||||
tofs:
|
||||
files_switch:
|
||||
- any/path/can/be/used/here
|
||||
@ -36,5 +40,5 @@ values:
|
||||
- os_family
|
||||
source_files:
|
||||
nsd-config-file-file-managed:
|
||||
- example.tmpl.jinja
|
||||
- nsd.conf.jinja
|
||||
winner: pillar
|
||||
|
@ -5,6 +5,6 @@ portage:
|
||||
sync_wait_one_day: true
|
||||
nsd:
|
||||
pkg:
|
||||
name: 'app-shells/bash'
|
||||
name: 'nsd'
|
||||
service:
|
||||
name: "{{ 'systemd-journald' if grains.init == 'systemd' else 'mtab' }}"
|
||||
name: 'nsd'
|
||||
|
@ -15,7 +15,7 @@ nsd:
|
||||
name: cronie
|
||||
service:
|
||||
name: crond
|
||||
config: /etc/template-formula.conf
|
||||
config: /etc/nsd/nsd.conf
|
||||
|
||||
tofs:
|
||||
# The files_switch key serves as a selector for alternative
|
||||
@ -46,7 +46,7 @@ nsd:
|
||||
# For testing purposes
|
||||
source_files:
|
||||
nsd-config-file-file-managed:
|
||||
- 'example.tmpl.jinja'
|
||||
- 'nsd.conf.jinja'
|
||||
|
||||
# Just for testing purposes
|
||||
winner: pillar
|
||||
|
Loading…
Reference in New Issue
Block a user