Skip to content

Updated for performance (made lean) and idempotent goodness (#3) - #2

Open
wirwolf wants to merge 1 commit into
SomeBlackMagic:master_bougiefrom
bougie:master
Open

wirwolf wants to merge 1 commit into
SomeBlackMagic:master_bougiefrom
bougie:master

Conversation

@wirwolf

@wirwolf wirwolf commented Mar 22, 2024

Copy link
Copy Markdown
  • Add Ubuntu support.

  • Rework the config generator to support ext_pillar mongo.

  • Manage /etc/default/unbound.

  • Add editor hints Change to standard file naming
    Add RedHat/CentOS defaults

  • refactor to use map.jinja

  • fix unbound defaults.yaml

  • fix defaults.yaml

  • Style fixes

  • probably don't want to use config_file

  • Update config.sls

  • style(README): assumed typo fix

  • fix(config.sls): standard pathing

use standard salt path (salt://blah) instead of {{slspath}}

  • refactor(*) less one-line includes

map.jinja:

  • (New) Lines 5-22: contents of osmap.yaml

  • (Old) Line 6: removed codenamemap import as it was an empty dict osmap.yaml: no longer needed
    codenamemap.yaml: no longer needed

  • refactor(*): condensed init.sls, made lean

init.sls handle both install.sls and service.sls in 7 lines. install.sls: no longer needed
service.sls: no longer needed

  • feat(macros.jinja): added convenience functions

safe_print will handle printing values correctly directive will swap underscores for hypens (salt -> unbound syntax)

  • refactor(*): moved to unbound directives directly

defaults.yaml:

  • added the default auto-trust-anchor-file
  • acls to access_control, to match unbound's access-control
  • interfaces to interface

unbound.conf.jinja:
Moved away from static option definitions entirely. Doing so allows this formula to be much more flexible as it no longer needs to follow a moving target (unbound development).

  • docs(pillar.example): expanded the example pillar

The updated format better demos the near 1:1 use of unbound directives.

  • fix(conf.jinja): fixed accessors

  • Removing default anchor file as it's not always created there.

  • Changing from config.blah to unbound.blah from line 1 import

  • Changing to slightly more traditional(?) dict access

  • fix(template): testing possible misunderstanding

  • refactor(*): standard pathing

  • docs(example): copy/paste will be my downfall

  • fix(init): correcting embarrassing oversight

  • fix(macro): copy/paste again will kill me one day

  • fix(template): removing sort, it introduces issues

  • fix(template): remove failed hard

Jinja variable 'salt.utils.odict.OrderedDict object' has no attribute 'remove'

  • fix(template): correctly using iterable objs

  • fix(template): disable string iteration (lol)

  • fix(macros): removed lazy bool to string attempt

yaml parsing simply reads it as true false.
converting pillars to strings instead.

  • fix(template): correct whitespacing finally

* Add Ubuntu support.

Signed-off-by: Rene Jochum <rene@jochums.at>

* Rework the config generator to support ext_pillar mongo.

Signed-off-by: Rene Jochum <rene@jochums.at>

* Manage /etc/default/unbound.

Signed-off-by: Rene Jochum <rene@jochums.at>

* Add editor hints
Change to standard file naming
Add RedHat/CentOS defaults

* refactor to use map.jinja

* fix unbound defaults.yaml

* fix defaults.yaml

* Style fixes

* probably don't want to use config_file

* Update config.sls

* style(README): assumed typo fix

* fix(config.sls): standard pathing

use standard salt path (salt://blah) instead of `{{slspath}}`

* refactor(*) less one-line includes

`map.jinja`:
*  (New) Lines 5-22: contents of *osmap.yaml*
*  (Old) Line 6: removed codenamemap import as it was an empty dict
`osmap.yaml`: no longer needed
`codenamemap.yaml`: no longer needed

* refactor(*): condensed init.sls, made lean

`init.sls` handle both `install.sls` and `service.sls` in 7 lines.
`install.sls`: no longer needed
`service.sls`: no longer needed

* feat(macros.jinja): added convenience functions

`safe_print` will handle printing values correctly
`directive` will swap underscores for hypens (salt -> unbound syntax)

* refactor(*): moved to unbound directives directly

`defaults.yaml`:
*  added the default auto-trust-anchor-file
*  `acls` to `access_control`, to match unbound's `access-control`
*  `interfaces` to `interface`

`unbound.conf.jinja`:
Moved away from static option definitions entirely.
Doing so allows this formula to be much more flexible as it no longer
needs to follow a moving target (unbound development).

* docs(pillar.example): expanded the example pillar

The updated format better demos the near 1:1 use of unbound directives.

* fix(conf.jinja): fixed accessors

*  Removing default anchor file as it's not always created there.
*  Changing from `config.blah` to `unbound.blah` from line 1 import
*  Changing to slightly more traditional(?) dict access

* fix(template): testing possible misunderstanding

* refactor(*): standard pathing

* docs(example): copy/paste will be my downfall

* fix(init): correcting embarrassing oversight

* fix(macro): copy/paste again will kill me one day

* fix(template): removing sort, it introduces issues

* fix(template): remove failed hard

`Jinja variable 'salt.utils.odict.OrderedDict object' has no attribute 'remove'`

* fix(template): correctly using iterable objs

* fix(template): disable string iteration (lol)

* fix(macros): removed lazy bool to string attempt

yaml parsing simply reads it as true false.
converting pillars to strings instead.

* fix(template): correct whitespacing finally

Co-authored-by: Rene Jochum <rene@jochums.at>
Co-authored-by: campbell <campbell@dxclabs.com>
Co-authored-by: Solomon Gifford <solomongifford@gmail.com>
Co-authored-by: Beau Bilyeu <bbilyeu@contegix.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants