Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Support vars plugins in collections #61078
Vars plugins were previously ignored in collections
This allows developers to require whitelisting for their vars plugin and users to control when vars plugins are executed.
The plugins themselves control whether or not whitelisting is required. Third-party plugins will continue to run by default unless they add whitelisting support. Since PluginLoader.all() does not search collections, vars plugins in collections will need to be in the list of enabled vars plugins. The
There are two new settings to control when vars plugins run and they default to the current behavior. They can be used in tandem or separately. RUN_VARS_PLUGINS is a global setting that determines whether to run vars plugins anytime variables are 'demanded' by tasks, or just at the 'start' after importing an inventory source. The other setting 'stage' is vars plugin specific and can be set in ansible.cfg or an env var.