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
Assigning group variables in inventory module #189
Comments
I think because this inventory plugin is based upon ansible.builtin.constructed which doesn't provide your feature...maybe it wouldn't be added? Maybe you can request your feature idea in the core Ansible project? Then all other projects' inventory plugins based on I think the idea is that you use plugin: ansible.builtin.constructed
strict: False
compose:
var_sum: var1 + var2
# this variable will only be set if I have a persistent fact cache enabled (and have non expired facts)
# `strict: False` will skip this instead of producing an error if it is missing facts.
server_type: "ansible_hostname | regex_replace ('(.{6})(.{2}).*', '\\2')"
groups:
# simple name matching
webservers: inventory_hostname.startswith('web') you can then have the vars file in var1: value1
var2: value2
etc. |
SUMMARY
It would be very handy to have possibility to add not only host variables but also group variables. Is this feature planned?
ISSUE TYPE
COMPONENT NAME
Now inventory module.
ADDITIONAL INFORMATION
N/A
The text was updated successfully, but these errors were encountered: