mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 05:10:22 -07:00
Add toml inventory plugin (#41593)
* First pass at a toml inventory * Make EXAMPLES yaml * Remove unnecessary comment * Small formatting changes * Add ansible-inventory option to list as TOML * TOML inventory improvements, to allow a more simple inventory, specifically related to children * changelog * Simplify logic * Dedupe _expand_hostpattern, making it available to all inventory plugins * Don't make the TOML inventory dependent on the YAML inventory * Quote IP address values * Add more TOML examples * Further cleanups * Enable the toml inventory to run by default * Create toml specific dumper * 2.8 * Clean up imports * No toml pygments lexer * Don't raise an exception early when toml isn't present, and move toml to the end, since it requires an external dep * Require toml>=0.10.0 * Further clean up of empty data * Don't require toml>=0.10.0, but prefer it, add code for fallback in older versions * Ensure we actually pass an encoder to toml.dumps * Simplify recursive data converter * Appease tests, since we haven't limited controller testing to 2.7+ * Update docstring for convert_yaml_objects_to_native * remove outdated catching of AttributeError * We don't need to catch ImportError when import ansible.plugins.inventory.toml * Add note about what self.dump_funcs.update is doing * Address some things * A little extra comment * Fix toml availability check * Don't create an intermediate list * Require toml file extension * Add metadata * Remove TOML docs from intro_inventory to prevent people from getting the wrong idea * It's in defaults, remove note * core supported, indicate very clearly that this is preview status
This commit is contained in:
parent
1441c6ad3f
commit
9949629e5a
8 changed files with 353 additions and 83 deletions
|
@ -1408,7 +1408,7 @@ INVENTORY_ANY_UNPARSED_IS_FAILED:
|
|||
version_added: "2.7"
|
||||
INVENTORY_ENABLED:
|
||||
name: Active Inventory plugins
|
||||
default: ['host_list', 'script', 'yaml', 'ini', 'auto']
|
||||
default: ['host_list', 'script', 'yaml', 'ini', 'toml', 'auto']
|
||||
description: List of enabled inventory plugins, it also determines the order in which they are used.
|
||||
env: [{name: ANSIBLE_INVENTORY_ENABLED}]
|
||||
ini:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue