fix: stop services from being exclusively in pillar #62
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR progress checklist (to be filled in by reviewers)
What type of PR is this?
Primary type
[build]Changes related to the build system[chore]Changes to the build process or auxiliary tools and libraries such as documentation generation[ci]Changes to the continuous integration configuration[feat]A new feature[fix]A bug fix[perf]A code change that improves performance[refactor]A code change that neither fixes a bug nor adds a feature[revert]A change used to revert a previous commit[style]Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.)Secondary type
[docs]Documentation changes[test]Adding missing or correcting existing testsDoes this PR introduce a
BREAKING CHANGE?Sort of - any users that were populating firewalld service xml from their pillar will just need to prepend a 'lookup' key one level up from services.
Example of previous pillar data:
New proposed pillar data with same functionality:
The pillar.example file has been updated to reflect this new style.
However, since the filrewalld/services file.directory is not being managed with the
clean=trueoption, this change won't delete any existing firewalld service xml on an existing minion but will just cease pushing updates until the pillar and/or defaults.yaml is corrected.Related issues and/or pull requests
Describe the changes you're proposing
Instead of configuring firewalld service xml exclusively from pillar data, this change allows users to specify them in defaults.yaml. This can help reduce pillar data size for minions, but still fully supports users doing service customizations and merges/overrides simply by moving their service pillar data underneath the 'firewalld:lookup' key. An empty dictionary called 'services' has also been added to the stock
defaults.yamlfilePillar / config required to test the proposed changes
Taken from pillar.example :
Debug log showing how the proposed changes work
The underlying functionality of the states are very preserved, just that services.sls loops over
firewalld.servicesinstead ofsalt['pillar.get']('firewalld:services')Documentation checklist
README(e.g.Available states).pillar.example.Testing checklist
state_top).Additional context