fix(config_management): set config dict keys to be valid ansible variables
!18 fixes #47
This commit is contained in:
@ -31,3 +31,11 @@ Considerable thought was placed into as wide a scope as possible, how the host c
|
||||
A host can be assigned to multiple groups as long as the host is not part of the same branch. This image has had each node coloured to denote different groups of the same branch. Note: the red node is a common node for the three branches. for example a host can be placed in each of the three coloured branches. the root node however, if the host is placed in this group then the host can not be placed in any other node. this is because the red node is the root for all three coloured branches.
|
||||
|
||||
When it comes time to merge the configuration, if a parent group has the same config as it's childs config. The childs config will take precedence. For a host that is placed in all three branches (orange, green and blue), based of of the group name, sorted alphanumerically, the last group that has conflicting config will be the one that is used. A groups config will always be rendered with it's parents config included all the way up the branch to the root node.
|
||||
|
||||
|
||||
## Configuration
|
||||
|
||||
Configuration has been setup in such a way that it replicates the Ansible inventory, in particular inventory groups. Just like in a regular Ansible inventory group, you can assign variables to a group for use during a play.
|
||||
|
||||
!!! tip
|
||||
If you add a dictionary key to the group config and it be an invalid Ansible variable, the key will be automagically changed so that it is valid. A `space`, `.` or `-` will be set as an underscore `_` and capitol letters will be reset to be lower case.
|
||||
|
Reference in New Issue
Block a user