WIP: refresh pillar data on host update #143
Open
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.
This PR is currently not finished and should not be merged. I want to start a discussion about how to integrate such a feature.
Our usecase:
We want to be able to use the Salt environment set in the hosts pillar data as the env for the minion. In order to do this we need
a little change in Salt (see saltstack/salt#60233) and a new command in the proxy plugin (see theforeman/smart_proxy_salt#65)
This works well, but now i hit a roadblock with the code in this PR. Because salt-master will run foreman-node (and therefor update the minions grains) it will trigger another host update, which in turn triggers a update of the hosts grains, resulting in an endless loop.
Is there any way to check whether the user has adjusted the Salt environment itself to only trigger the refresh of pillar data if that's the case?