-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option to roles to enforce defaults #567
Merged
sean-m-sullivan
merged 11 commits into
redhat-cop:devel
from
sean-m-sullivan:default_v1
Apr 10, 2023
Merged
Add option to roles to enforce defaults #567
sean-m-sullivan
merged 11 commits into
redhat-cop:devel
from
sean-m-sullivan:default_v1
Apr 10, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…op#563) * an inventory source is not ever assigned to an organization * if no organization, no output for organization field
…nfiguration into default_v1
…nfiguration into default_v1
sean-m-sullivan
requested review from
branic,
Tompage1994,
djdanielsson and
ivarmu
April 8, 2023 22:12
…nfiguration into default_v1
…nfiguration into default_v1
…nfiguration into default_v1
…nfiguration into default_v1
djdanielsson
requested changes
Apr 8, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Questions
sean-m-sullivan
force-pushed
the
default_v1
branch
4 times, most recently
from
April 9, 2023 00:31
6267568
to
4d8b0a3
Compare
sean-m-sullivan
force-pushed
the
default_v1
branch
from
April 9, 2023 00:47
4d8b0a3
to
ce997f0
Compare
djdanielsson
approved these changes
Apr 9, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't wait to try it out
przemkalit
pushed a commit
to przemkalit/aap_configuration
that referenced
this pull request
Nov 22, 2024
* An inventory source is not ever assigned to an organization (redhat-cop#563) * an inventory source is not ever assigned to an organization * if no organization, no output for organization field * linting * update workflow --------- Co-authored-by: Ivan Aragonés Muniesa <26822043+ivarmu@users.noreply.github.com>
przemkalit
pushed a commit
to przemkalit/aap_configuration
that referenced
this pull request
Nov 22, 2024
* An inventory source is not ever assigned to an organization (redhat-cop#563) * an inventory source is not ever assigned to an organization * if no organization, no output for organization field * linting * update workflow --------- Co-authored-by: Ivan Aragonés Muniesa <26822043+ivarmu@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What does this PR do?
As per the discussion an option has been added to multiple roles to enforce defaults.
This option enforces module/api defaults in order to prevent config drift. This makes it so if an option is NOT specified in a configuration it enforces the default value. It is not enabled by default.
I have started with two roles that have multiple options enabled for review. The default environment is not set in orgs as there is an underlying issue with the module and the API where the default value is null, and its hard to pass that through the role->module->api.
I did try to do inline if/else like we do galaxy creds and it did not work
I tried to make my own default filter, but it does not allow for a variable to not be defined.
In the end I settled on a simple lookup plugin to perform the if/else logic and thus provide the default with one value to then work on.
How should this be tested?
This has been turned on in automated tests
Is there a relevant Issue open for this?
#495