-
Notifications
You must be signed in to change notification settings - Fork 361
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
Basic Ansible Typing System #441
Open
matburt
wants to merge
8
commits into
devel
Choose a base branch
from
ansible-type
base: devel
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
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
This commit adds a new typing system to ansible-runner that allows for programmatically buiding playbook and inventory objects. The added objects for playbook and inventory allow developers to construct a playbook and/or inventory using native Python constructs instead of having to create them out-of-band. Once created the objects can be serialized to JSON and injected directly to ansible-runner for execution. This commit also updates Pipefil with missing developer packages and adds python coverage reporting to tox. Signed-off-by: Peter Sprygada <[email protected]>
This commit removes some helper functions that are not needed for this commit as they are causing unit test failures. The helper functions will be resubmitted when they are needed. Signed-off-by: Peter Sprygada <[email protected]>
This commit switches over to using ensure_str as the type conversion function Signed-off-by: Peter Sprygada <[email protected]>
This commit addresses a situation where vars where assigned directly to the child object instead of the vars attribute. Vars are now properly serialized and deserialized to the vars attribute. Signed-off-by: Peter Sprygada <[email protected]>
This commit adds usage examples for how to use ```Playbook``` and ```Inventory``` objects in Python code to construct objects that can serialized to valid Ansible playbooks and inventory files. Signed-off-by: Peter Sprygada <[email protected]>
Thsi commit adds a new usage example that demonstrates how the `Inventory` and `Playbook` objects can be used as input the the `run()` method for executing playbooks. Signed-off-by: Peter Sprygada <[email protected]>
This commit now handles mutually exclusive checks during serialization instead of at set. Before this change, mutually exclusive item checks would be missed when attributes where not scalar values. This change allows adds a new attribute property `mutually_exclusive_priority` that allows an object to set the relative priority of an attribute within a mutually exclusive group. Signed-off-by: Peter Sprygada <[email protected]>
This commit refactors the mutually_exclusive_with property to mutually_exclusive_group to better relay its function. The property can be used to setup a group of attributes where by at most one attribute is used to serialize the data structure. Signed-off-by: Peter Sprygada <[email protected]>
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.
Based on some work peter did to put an object structure around some basic ansible things.