Allow for custom stacks#75
Open
hazzuk wants to merge 27 commits into
Open
Conversation
Stack templates will now move to a custom stacks repo.
Required by Ansible to use multiple defaults files.
Stack groups and stack names are now defined separately, allowing for custom stacks.
This setup keeps tracking the karo-compose role's defaults and templates directories.
Not all stacks will have their configuration present. This will now only set secrets 'when' the stack is 'enabled'. It's then safe to assume the user has defined the required secrets.
Using the combine filter is Ansible's recommended approach for merging multiple dictionaries.
This reverts commit d597a56. The use of dictionary data structures should be avoided.
The loop syntax is recommended over with_<lookup> by Ansible.
Used when editing the Ansible vault file.
Allows for adding and removing karo-custom repos.
Clearing symlinks also becomes easier, as it doesn't need to be recursive.
Owner
Author
|
Tested with my existing server and the new hazzuk/karo-custom repo.
|
This file contains hidden or 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
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.
Description
This PR allows anyone the ability to create their own custom stacks, and to distribute them freely. Creating a fully modular system.
Changes
just custom, toaddorremovekaro-custom repos.Notes
Stacks now use a dictionary data structure.
composevariable, used in stack templates.Note, while this PR implements the use of dictionary variables. In general, this should likely be avoided for future features (unless there is a good reason to use this type of data structure). What a user declares in their inventory, and the defaults it overwrites can quickly become problematic when using dictionaries. Karo-compose has new functionality that specifically merges the two together for stack variables.
Users have to order their 'stack groups'. And each stack group will provide defaults for their internal ordering of stacks. This approach was implement as it's the ideal middle ground for control, versus the trade off of complexity (say if you were to require users to list and order every individual stack).
While there have been a large number of code changes to the karo-compose role's tasks. The general sequence for managing stacks has remained mostly the same.
Checklist