diff --git a/docs/README.rst b/docs/README.rst index 24fca94..55843fb 100644 --- a/docs/README.rst +++ b/docs/README.rst @@ -18,8 +18,14 @@ unbound-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 which manages _unbound_. + +The actual configuration file is out of scope. +It's not trivial to map Pillar data to ubound's configuration format. +Furthermore it's not clear that this the best approach in all use-cases. + +Therefore this formula assumes you'll provide a configuration file (or a template) +following the `TOFS pattern `_. .. contents:: **Table of Contents** :depth: 1 diff --git a/docs/map.jinja.rst b/docs/map.jinja.rst index 15ba7e8..b37d4b7 100644 --- a/docs/map.jinja.rst +++ b/docs/map.jinja.rst @@ -489,7 +489,7 @@ Here is an example based on `template-formula/unbound/config/file.sls`_: unbound-config-file-file-managed: file.managed: - name: {{ unbound.config }} - - source: {{ files_switch(['example.tmpl'], + - source: {{ files_switch(['unbound.conf'], lookup='unbound-config-file-file-managed' ) }} diff --git a/pillar.example b/pillar.example index ca49814..fcc0f23 100644 --- a/pillar.example +++ b/pillar.example @@ -8,14 +8,11 @@ unbound: 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: unbound + # service: + # name: unbound + # config: /etc/unbound/unbound.conf tofs: # The files_switch key serves as a selector for alternative @@ -48,7 +45,7 @@ unbound: # For testing purposes source_files: unbound-config-file-file-managed: - - 'example.tmpl.jinja' + - 'unbound.conf.jinja' # Just for testing purposes winner: pillar diff --git a/test/integration/default/controls/config.rb b/test/integration/default/controls/config.rb index f3e17a5..5b1f4d8 100644 --- a/test/integration/default/controls/config.rb +++ b/test/integration/default/controls/config.rb @@ -3,20 +3,20 @@ control 'unbound.config.file' do title 'Verify the configuration file' - describe file('/etc/template-formula.conf') do + describe file('/etc/unbound/unbound.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.' + 'This is just a sample for testing purposes.' ) 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/unbound/unbound.conf"' } its('content') { should include '"lookup": {"added_in_lookup": "lookup_value",' } its('content') { should include '"pkg": {"name": "' } its('content') { should include '"service": {"name": "' } @@ -26,7 +26,7 @@ control 'unbound.config.file' do should include( '"tofs": {"files_switch": ["any/path/can/be/used/here", "id", '\ '"roles", "osfinger", "os", "os_family"], "source_files": '\ - '{"unbound-config-file-file-managed": ["example.tmpl.jinja"]}' + '{"unbound-config-file-file-managed": ["unbound.conf.jinja"]}' ) # rubocop:enable Layout/LineLength # rubocop:enable Lint/RedundantCopDisableDirective diff --git a/test/integration/default/files/_mapdata/amazonlinux-1.yaml b/test/integration/default/files/_mapdata/amazonlinux-1.yaml index f4cd0e0..86296b7 100644 --- a/test/integration/default/files/_mapdata/amazonlinux-1.yaml +++ b/test/integration/default/files/_mapdata/amazonlinux-1.yaml @@ -6,7 +6,7 @@ values: added_in_lookup: lookup_value added_in_pillar: pillar_value arch: amd64 - config: /etc/template-formula.conf + config: /etc/unbound/unbound.conf lookup: added_in_lookup: lookup_value master: template-master @@ -36,5 +36,5 @@ values: - os_family source_files: unbound-config-file-file-managed: - - example.tmpl.jinja + - unbound.conf.jinja winner: pillar diff --git a/test/integration/default/files/_mapdata/amazonlinux-2.yaml b/test/integration/default/files/_mapdata/amazonlinux-2.yaml index 830ded6..d636b46 100644 --- a/test/integration/default/files/_mapdata/amazonlinux-2.yaml +++ b/test/integration/default/files/_mapdata/amazonlinux-2.yaml @@ -6,7 +6,7 @@ values: added_in_lookup: lookup_value added_in_pillar: pillar_value arch: amd64 - config: /etc/template-formula.conf + config: /etc/unbound/unbound.conf lookup: added_in_lookup: lookup_value master: template-master @@ -22,10 +22,10 @@ values: - Y:G@id master: template-master pkg: - name: bash + name: unbound rootgroup: root service: - name: systemd-journald + name: unbound tofs: files_switch: - any/path/can/be/used/here @@ -36,5 +36,5 @@ values: - os_family source_files: unbound-config-file-file-managed: - - example.tmpl.jinja + - unbound.conf.jinja winner: pillar diff --git a/test/integration/default/files/_mapdata/arch-base-latest.yaml b/test/integration/default/files/_mapdata/arch-base-latest.yaml index ef4538f..57e4179 100644 --- a/test/integration/default/files/_mapdata/arch-base-latest.yaml +++ b/test/integration/default/files/_mapdata/arch-base-latest.yaml @@ -6,7 +6,7 @@ values: added_in_lookup: lookup_value added_in_pillar: pillar_value arch: amd64 - config: /etc/template-formula.conf + config: /etc/unbound/unbound.conf lookup: added_in_lookup: lookup_value master: template-master @@ -22,10 +22,10 @@ values: - Y:G@id master: template-master pkg: - name: bash + name: unbound rootgroup: root service: - name: systemd-journald + name: unbound tofs: files_switch: - any/path/can/be/used/here @@ -36,5 +36,5 @@ values: - os_family source_files: unbound-config-file-file-managed: - - example.tmpl.jinja + - unbound.conf.jinja winner: pillar diff --git a/test/integration/default/files/_mapdata/centos-6.yaml b/test/integration/default/files/_mapdata/centos-6.yaml index fc4805e..4e59764 100644 --- a/test/integration/default/files/_mapdata/centos-6.yaml +++ b/test/integration/default/files/_mapdata/centos-6.yaml @@ -6,7 +6,7 @@ values: added_in_lookup: lookup_value added_in_pillar: pillar_value arch: amd64 - config: /etc/template-formula.conf + config: /etc/unbound/unbound.conf lookup: added_in_lookup: lookup_value master: template-master @@ -36,5 +36,5 @@ values: - os_family source_files: unbound-config-file-file-managed: - - example.tmpl.jinja + - unbound.conf.jinja winner: pillar diff --git a/test/integration/default/files/_mapdata/centos-7.yaml b/test/integration/default/files/_mapdata/centos-7.yaml index 8d677b4..e35f770 100644 --- a/test/integration/default/files/_mapdata/centos-7.yaml +++ b/test/integration/default/files/_mapdata/centos-7.yaml @@ -6,7 +6,7 @@ values: added_in_lookup: lookup_value added_in_pillar: pillar_value arch: amd64 - config: /etc/template-formula.conf + config: /etc/unbound/unbound.conf lookup: added_in_lookup: lookup_value master: template-master @@ -22,10 +22,10 @@ values: - Y:G@id master: template-master pkg: - name: bash + name: unbound rootgroup: root service: - name: systemd-journald + name: unbound tofs: files_switch: - any/path/can/be/used/here @@ -36,5 +36,5 @@ values: - os_family source_files: unbound-config-file-file-managed: - - example.tmpl.jinja + - unbound.conf.jinja winner: pillar diff --git a/test/integration/default/files/_mapdata/centos-8.yaml b/test/integration/default/files/_mapdata/centos-8.yaml index fa20ac6..39e1101 100644 --- a/test/integration/default/files/_mapdata/centos-8.yaml +++ b/test/integration/default/files/_mapdata/centos-8.yaml @@ -6,7 +6,7 @@ values: added_in_lookup: lookup_value added_in_pillar: pillar_value arch: amd64 - config: /etc/template-formula.conf + config: /etc/unbound/unbound.conf lookup: added_in_lookup: lookup_value master: template-master @@ -22,10 +22,10 @@ values: - Y:G@id master: template-master pkg: - name: bash + name: unbound rootgroup: root service: - name: systemd-journald + name: unbound tofs: files_switch: - any/path/can/be/used/here @@ -36,5 +36,5 @@ values: - os_family source_files: unbound-config-file-file-managed: - - example.tmpl.jinja + - unbound.conf.jinja winner: pillar diff --git a/test/integration/default/files/_mapdata/debian-10.yaml b/test/integration/default/files/_mapdata/debian-10.yaml index c64e444..fe43531 100644 --- a/test/integration/default/files/_mapdata/debian-10.yaml +++ b/test/integration/default/files/_mapdata/debian-10.yaml @@ -6,7 +6,7 @@ values: added_in_lookup: lookup_value added_in_pillar: pillar_value arch: amd64 - config: /etc/template-formula.conf + config: /etc/unbound/unbound.conf lookup: added_in_lookup: lookup_value master: template-master @@ -22,10 +22,10 @@ values: - Y:G@id master: template-master pkg: - name: bash + name: unbound rootgroup: root service: - name: systemd-journald + name: unbound tofs: files_switch: - any/path/can/be/used/here @@ -36,5 +36,5 @@ values: - os_family source_files: unbound-config-file-file-managed: - - example.tmpl.jinja + - unbound.conf.jinja winner: pillar diff --git a/test/integration/default/files/_mapdata/debian-9.yaml b/test/integration/default/files/_mapdata/debian-9.yaml index 3042fbd..32e1344 100644 --- a/test/integration/default/files/_mapdata/debian-9.yaml +++ b/test/integration/default/files/_mapdata/debian-9.yaml @@ -6,7 +6,7 @@ values: added_in_lookup: lookup_value added_in_pillar: pillar_value arch: amd64 - config: /etc/template-formula.conf + config: /etc/unbound/unbound.conf lookup: added_in_lookup: lookup_value master: template-master @@ -22,10 +22,10 @@ values: - Y:G@id master: template-master pkg: - name: bash + name: unbound rootgroup: root service: - name: systemd-journald + name: unbound tofs: files_switch: - any/path/can/be/used/here @@ -36,5 +36,5 @@ values: - os_family source_files: unbound-config-file-file-managed: - - example.tmpl.jinja + - unbound.conf.jinja winner: pillar diff --git a/test/integration/default/files/_mapdata/fedora-31.yaml b/test/integration/default/files/_mapdata/fedora-31.yaml index db5b893..31eb513 100644 --- a/test/integration/default/files/_mapdata/fedora-31.yaml +++ b/test/integration/default/files/_mapdata/fedora-31.yaml @@ -6,7 +6,7 @@ values: added_in_lookup: lookup_value added_in_pillar: pillar_value arch: amd64 - config: /etc/template-formula.conf + config: /etc/unbound/unbound.conf lookup: added_in_lookup: lookup_value master: template-master @@ -22,10 +22,10 @@ values: - Y:G@id master: template-master pkg: - name: bash + name: unbound rootgroup: root service: - name: systemd-journald + name: unbound tofs: files_switch: - any/path/can/be/used/here @@ -36,5 +36,5 @@ values: - os_family source_files: unbound-config-file-file-managed: - - example.tmpl.jinja + - unbound.conf.jinja winner: pillar diff --git a/test/integration/default/files/_mapdata/fedora-32.yaml b/test/integration/default/files/_mapdata/fedora-32.yaml index 506eb70..9311be7 100644 --- a/test/integration/default/files/_mapdata/fedora-32.yaml +++ b/test/integration/default/files/_mapdata/fedora-32.yaml @@ -6,7 +6,7 @@ values: added_in_lookup: lookup_value added_in_pillar: pillar_value arch: amd64 - config: /etc/template-formula.conf + config: /etc/unbound/unbound.conf lookup: added_in_lookup: lookup_value master: template-master @@ -22,10 +22,10 @@ values: - Y:G@id master: template-master pkg: - name: bash + name: unbound rootgroup: root service: - name: systemd-journald + name: unbound tofs: files_switch: - any/path/can/be/used/here @@ -36,5 +36,5 @@ values: - os_family source_files: unbound-config-file-file-managed: - - example.tmpl.jinja + - unbound.conf.jinja winner: pillar diff --git a/test/integration/default/files/_mapdata/fedora-33.yaml b/test/integration/default/files/_mapdata/fedora-33.yaml index 8180a2a..ef3c5b3 100644 --- a/test/integration/default/files/_mapdata/fedora-33.yaml +++ b/test/integration/default/files/_mapdata/fedora-33.yaml @@ -6,7 +6,7 @@ values: added_in_lookup: lookup_value added_in_pillar: pillar_value arch: amd64 - config: /etc/template-formula.conf + config: /etc/unbound/unbound.conf lookup: added_in_lookup: lookup_value master: template-master @@ -22,10 +22,10 @@ values: - Y:G@id master: template-master pkg: - name: bash + name: unbound rootgroup: root service: - name: systemd-journald + name: unbound tofs: files_switch: - any/path/can/be/used/here @@ -36,5 +36,5 @@ values: - os_family source_files: unbound-config-file-file-managed: - - example.tmpl.jinja + - unbound.conf.jinja winner: pillar diff --git a/test/integration/default/files/_mapdata/gentoo-2-sysd.yaml b/test/integration/default/files/_mapdata/gentoo-2-sysd.yaml index 289ed9b..8cbede7 100644 --- a/test/integration/default/files/_mapdata/gentoo-2-sysd.yaml +++ b/test/integration/default/files/_mapdata/gentoo-2-sysd.yaml @@ -6,7 +6,7 @@ values: added_in_lookup: lookup_value added_in_pillar: pillar_value arch: amd64 - config: /etc/template-formula.conf + config: /etc/unbound/unbound.conf lookup: added_in_lookup: lookup_value master: template-master @@ -25,7 +25,7 @@ values: name: app-shells/bash rootgroup: root service: - name: systemd-journald + name: unbound tofs: files_switch: - any/path/can/be/used/here @@ -36,5 +36,5 @@ values: - os_family source_files: unbound-config-file-file-managed: - - example.tmpl.jinja + - unbound.conf.jinja winner: pillar diff --git a/test/integration/default/files/_mapdata/gentoo-2-sysv.yaml b/test/integration/default/files/_mapdata/gentoo-2-sysv.yaml index e442389..c1442ea 100644 --- a/test/integration/default/files/_mapdata/gentoo-2-sysv.yaml +++ b/test/integration/default/files/_mapdata/gentoo-2-sysv.yaml @@ -6,7 +6,7 @@ values: added_in_lookup: lookup_value added_in_pillar: pillar_value arch: amd64 - config: /etc/template-formula.conf + config: /etc/unbound/unbound.conf lookup: added_in_lookup: lookup_value master: template-master @@ -36,5 +36,5 @@ values: - os_family source_files: unbound-config-file-file-managed: - - example.tmpl.jinja + - unbound.conf.jinja winner: pillar diff --git a/test/integration/default/files/_mapdata/opensuse-15.yaml b/test/integration/default/files/_mapdata/opensuse-15.yaml index bcd230d..b151b43 100644 --- a/test/integration/default/files/_mapdata/opensuse-15.yaml +++ b/test/integration/default/files/_mapdata/opensuse-15.yaml @@ -6,7 +6,7 @@ values: added_in_lookup: lookup_value added_in_pillar: pillar_value arch: amd64 - config: /etc/template-formula.conf + config: /etc/unbound/unbound.conf lookup: added_in_lookup: lookup_value master: template-master @@ -22,10 +22,10 @@ values: - Y:G@id master: template-master pkg: - name: bash + name: unbound rootgroup: root service: - name: systemd-journald + name: unbound tofs: files_switch: - any/path/can/be/used/here @@ -36,5 +36,5 @@ values: - os_family source_files: unbound-config-file-file-managed: - - example.tmpl.jinja + - unbound.conf.jinja winner: pillar diff --git a/test/integration/default/files/_mapdata/opensuse-tumbleweed.yaml b/test/integration/default/files/_mapdata/opensuse-tumbleweed.yaml index e40b348..a904dc2 100644 --- a/test/integration/default/files/_mapdata/opensuse-tumbleweed.yaml +++ b/test/integration/default/files/_mapdata/opensuse-tumbleweed.yaml @@ -6,7 +6,7 @@ values: added_in_lookup: lookup_value added_in_pillar: pillar_value arch: amd64 - config: /etc/template-formula.conf + config: /etc/unbound/unbound.conf lookup: added_in_lookup: lookup_value master: template-master @@ -22,10 +22,10 @@ values: - Y:G@id master: template-master pkg: - name: bash + name: unbound rootgroup: root service: - name: systemd-journald + name: unbound tofs: files_switch: - any/path/can/be/used/here @@ -36,5 +36,5 @@ values: - os_family source_files: unbound-config-file-file-managed: - - example.tmpl.jinja + - unbound.conf.jinja winner: pillar diff --git a/test/integration/default/files/_mapdata/oraclelinux-7.yaml b/test/integration/default/files/_mapdata/oraclelinux-7.yaml index a4b8c59..70b917b 100644 --- a/test/integration/default/files/_mapdata/oraclelinux-7.yaml +++ b/test/integration/default/files/_mapdata/oraclelinux-7.yaml @@ -6,7 +6,7 @@ values: added_in_lookup: lookup_value added_in_pillar: pillar_value arch: amd64 - config: /etc/template-formula.conf + config: /etc/unbound/unbound.conf lookup: added_in_lookup: lookup_value master: template-master @@ -22,10 +22,10 @@ values: - Y:G@id master: template-master pkg: - name: bash + name: unbound rootgroup: root service: - name: systemd-journald + name: unbound tofs: files_switch: - any/path/can/be/used/here @@ -36,5 +36,5 @@ values: - os_family source_files: unbound-config-file-file-managed: - - example.tmpl.jinja + - unbound.conf.jinja winner: pillar diff --git a/test/integration/default/files/_mapdata/oraclelinux-8.yaml b/test/integration/default/files/_mapdata/oraclelinux-8.yaml index 45717fb..ba98b0a 100644 --- a/test/integration/default/files/_mapdata/oraclelinux-8.yaml +++ b/test/integration/default/files/_mapdata/oraclelinux-8.yaml @@ -6,7 +6,7 @@ values: added_in_lookup: lookup_value added_in_pillar: pillar_value arch: amd64 - config: /etc/template-formula.conf + config: /etc/unbound/unbound.conf lookup: added_in_lookup: lookup_value master: template-master @@ -22,10 +22,10 @@ values: - Y:G@id master: template-master pkg: - name: bash + name: unbound rootgroup: root service: - name: systemd-journald + name: unbound tofs: files_switch: - any/path/can/be/used/here @@ -36,5 +36,5 @@ values: - os_family source_files: unbound-config-file-file-managed: - - example.tmpl.jinja + - unbound.conf.jinja winner: pillar diff --git a/test/integration/default/files/_mapdata/ubuntu-16.yaml b/test/integration/default/files/_mapdata/ubuntu-16.yaml index 722314e..234a248 100644 --- a/test/integration/default/files/_mapdata/ubuntu-16.yaml +++ b/test/integration/default/files/_mapdata/ubuntu-16.yaml @@ -6,7 +6,7 @@ values: added_in_lookup: lookup_value added_in_pillar: pillar_value arch: amd64 - config: /etc/template-formula.conf + config: /etc/unbound/unbound.conf lookup: added_in_lookup: lookup_value master: template-master @@ -22,10 +22,10 @@ values: - Y:G@id master: template-master pkg: - name: bash + name: unbound rootgroup: root service: - name: systemd-journald + name: unbound tofs: files_switch: - any/path/can/be/used/here @@ -36,5 +36,5 @@ values: - os_family source_files: unbound-config-file-file-managed: - - example.tmpl.jinja + - unbound.conf.jinja winner: pillar diff --git a/test/integration/default/files/_mapdata/ubuntu-18.yaml b/test/integration/default/files/_mapdata/ubuntu-18.yaml index ed62a18..3488059 100644 --- a/test/integration/default/files/_mapdata/ubuntu-18.yaml +++ b/test/integration/default/files/_mapdata/ubuntu-18.yaml @@ -6,7 +6,7 @@ values: added_in_lookup: lookup_value added_in_pillar: pillar_value arch: amd64 - config: /etc/template-formula.conf + config: /etc/unbound/unbound.conf lookup: added_in_lookup: lookup_value master: template-master @@ -22,10 +22,10 @@ values: - Y:G@id master: template-master pkg: - name: bash + name: unbound rootgroup: root service: - name: systemd-journald + name: unbound tofs: files_switch: - any/path/can/be/used/here @@ -36,5 +36,5 @@ values: - os_family source_files: unbound-config-file-file-managed: - - example.tmpl.jinja + - unbound.conf.jinja winner: pillar diff --git a/test/integration/default/files/_mapdata/ubuntu-20.yaml b/test/integration/default/files/_mapdata/ubuntu-20.yaml index 9a9ca7d..d8a2843 100644 --- a/test/integration/default/files/_mapdata/ubuntu-20.yaml +++ b/test/integration/default/files/_mapdata/ubuntu-20.yaml @@ -6,7 +6,7 @@ values: added_in_lookup: lookup_value added_in_pillar: pillar_value arch: amd64 - config: /etc/template-formula.conf + config: /etc/unbound/unbound.conf lookup: added_in_lookup: lookup_value master: template-master @@ -22,10 +22,10 @@ values: - Y:G@id master: template-master pkg: - name: bash + name: unbound rootgroup: root service: - name: systemd-journald + name: unbound tofs: files_switch: - any/path/can/be/used/here @@ -36,5 +36,5 @@ values: - os_family source_files: unbound-config-file-file-managed: - - example.tmpl.jinja + - unbound.conf.jinja winner: pillar diff --git a/test/salt/pillar/upstart.sls b/test/salt/pillar/upstart.sls index b7ea064..4726550 100644 --- a/test/salt/pillar/upstart.sls +++ b/test/salt/pillar/upstart.sls @@ -43,7 +43,7 @@ unbound: # For testing purposes source_files: unbound-config-file-file-managed: - - 'example.tmpl.jinja' + - 'unbound.conf.jinja' # Just for testing purposes winner: pillar diff --git a/unbound/config/file.sls b/unbound/config/file.sls index 8b621d3..6056074 100644 --- a/unbound/config/file.sls +++ b/unbound/config/file.sls @@ -13,7 +13,7 @@ include: unbound-config-file-file-managed: file.managed: - name: {{ unbound.config }} - - source: {{ files_switch(['example.tmpl'], + - source: {{ files_switch(['unbound.conf'], lookup='unbound-config-file-file-managed' ) }} @@ -22,6 +22,7 @@ unbound-config-file-file-managed: - group: {{ unbound.rootgroup }} - makedirs: True - template: jinja + - check_cmd: unbound-checkconf - require: - sls: {{ sls_package_install }} - context: diff --git a/unbound/files/default/example.tmpl b/unbound/files/default/example.tmpl deleted file mode 100644 index 2c9c60f..0000000 --- a/unbound/files/default/example.tmpl +++ /dev/null @@ -1,6 +0,0 @@ -######################################################################## -# File managed by Salt at <{{ source }}>. -# Your changes will be overwritten. -######################################################################## - -This is an example file from SaltStack template-formula. diff --git a/unbound/files/default/example.tmpl.jinja b/unbound/files/default/example.tmpl.jinja deleted file mode 100644 index 13b2175..0000000 --- a/unbound/files/default/example.tmpl.jinja +++ /dev/null @@ -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 -{{ unbound | json }} - -winner of the merge: {{ unbound['winner'] }} diff --git a/unbound/files/default/unbound.conf b/unbound/files/default/unbound.conf new file mode 100644 index 0000000..8c848d2 --- /dev/null +++ b/unbound/files/default/unbound.conf @@ -0,0 +1,6 @@ +# This is just a sample for testing purposes. +# Please provide your own config for your server(s)! + +server: + interface: 0.0.0.0 + interface: ::0 diff --git a/unbound/files/default/unbound.conf.jinja b/unbound/files/default/unbound.conf.jinja new file mode 100644 index 0000000..2372315 --- /dev/null +++ b/unbound/files/default/unbound.conf.jinja @@ -0,0 +1,11 @@ +# This is just a sample for testing purposes. +# Please provide your own config for your server(s)! + +server: + interface: 0.0.0.0 + interface: ::0 + +# You have access to the unbound variable: +# winner of the merge: {{ unbound.winner }} +# +# {{ unbound | json }} diff --git a/unbound/parameters/defaults.yaml b/unbound/parameters/defaults.yaml index c359246..95f0bb7 100644 --- a/unbound/parameters/defaults.yaml +++ b/unbound/parameters/defaults.yaml @@ -7,7 +7,7 @@ values: pkg: name: unbound rootgroup: root - config: '/etc/unbound' + config: '/etc/unbound/unbound.conf' service: name: unbound # Just here for testing diff --git a/unbound/parameters/os/Fedora.yaml b/unbound/parameters/os/Fedora.yaml index 66e725f..e3a2a79 100644 --- a/unbound/parameters/os/Fedora.yaml +++ b/unbound/parameters/os/Fedora.yaml @@ -12,8 +12,6 @@ # values: {} --- values: - pkg: - name: unbound-fedora - service: - name: service-fedora + config: '/etc/unbound/unbound.conf' + config_dir: '/etc/unbound' ... diff --git a/unbound/parameters/os/Ubuntu.yaml b/unbound/parameters/os/Ubuntu.yaml index fcab5d7..3c35cb7 100644 --- a/unbound/parameters/os/Ubuntu.yaml +++ b/unbound/parameters/os/Ubuntu.yaml @@ -11,8 +11,5 @@ # you can remove this file or provide at least an empty dict, e.g. # values: {} --- -values: - pkg: - name: unbound-ubuntu - config: /etc/unbound.d/custom-ubuntu.conf +values: {} ... diff --git a/unbound/parameters/os_family/Arch.yaml b/unbound/parameters/os_family/Arch.yaml index e1273ec..f999a14 100644 --- a/unbound/parameters/os_family/Arch.yaml +++ b/unbound/parameters/os_family/Arch.yaml @@ -11,9 +11,5 @@ # you can remove this file or provide at least an empty dict, e.g. # values: {} --- -values: - pkg: - name: unbound-arch - service: - name: service-arch +values: {} ... diff --git a/unbound/parameters/os_family/Debian.yaml b/unbound/parameters/os_family/Debian.yaml index fe777f9..0d579c7 100644 --- a/unbound/parameters/os_family/Debian.yaml +++ b/unbound/parameters/os_family/Debian.yaml @@ -11,8 +11,5 @@ # you can remove this file or provide at least an empty dict, e.g. # values: {} --- -values: - pkg: - name: unbound-debian - config: /etc/unbound.d/custom.conf +values: {} ... diff --git a/unbound/parameters/os_family/FreeBSD.yaml b/unbound/parameters/os_family/FreeBSD.yaml index 5f8fc25..c8b15cb 100644 --- a/unbound/parameters/os_family/FreeBSD.yaml +++ b/unbound/parameters/os_family/FreeBSD.yaml @@ -13,4 +13,5 @@ --- values: rootgroup: wheel + config: '/usr/local/etc/unbound/unbound.conf' ... diff --git a/unbound/parameters/os_family/Gentoo.yaml b/unbound/parameters/os_family/Gentoo.yaml index 16bcbcc..7c92b1d 100644 --- a/unbound/parameters/os_family/Gentoo.yaml +++ b/unbound/parameters/os_family/Gentoo.yaml @@ -11,7 +11,5 @@ # you can remove this file or provide at least an empty dict, e.g. # values: {} --- -values: - pkg: - name: unbound-gentoo +values: {} ... diff --git a/unbound/parameters/os_family/RedHat.yaml b/unbound/parameters/os_family/RedHat.yaml index b9862f9..d5ccf0c 100644 --- a/unbound/parameters/os_family/RedHat.yaml +++ b/unbound/parameters/os_family/RedHat.yaml @@ -12,7 +12,5 @@ # values: {} --- values: - pkg: - name: unbound-redhat config: /etc/unbound.conf ... diff --git a/unbound/parameters/os_family/Suse.yaml b/unbound/parameters/os_family/Suse.yaml index fc39a27..a608845 100644 --- a/unbound/parameters/os_family/Suse.yaml +++ b/unbound/parameters/os_family/Suse.yaml @@ -11,7 +11,5 @@ # you can remove this file or provide at least an empty dict, e.g. # values: {} --- -values: - pkg: - name: unbound-suse +values: {} ... diff --git a/unbound/parameters/osfinger/CentOS-6.yaml b/unbound/parameters/osfinger/CentOS-6.yaml index 197b8b4..808b828 100644 --- a/unbound/parameters/osfinger/CentOS-6.yaml +++ b/unbound/parameters/osfinger/CentOS-6.yaml @@ -11,8 +11,5 @@ # you can remove this file or provide at least an empty dict, e.g. # values: {} --- -values: - pkg: - name: unbound-centos-6 - config: /etc/unbound.d/custom-centos-6.conf +values: {} ... diff --git a/unbound/parameters/osfinger/Ubuntu-18.04.yaml b/unbound/parameters/osfinger/Ubuntu-18.04.yaml index 985fd1d..5a279ca 100644 --- a/unbound/parameters/osfinger/Ubuntu-18.04.yaml +++ b/unbound/parameters/osfinger/Ubuntu-18.04.yaml @@ -11,6 +11,5 @@ # you can remove this file or provide at least an empty dict, e.g. # values: {} --- -values: - config: /etc/unbound.d/custom-ubuntu-18.04.conf +values: {} ...