-
Notifications
You must be signed in to change notification settings - Fork 23.8k
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
Support vars_files when using import_playbook #36806
Comments
Files identified in the description: If these files are inaccurate, please update the |
Any update on this issue? Is there something core blocking the implementation of this feature? I'm happy to have a look at implementing it if there's nothing specific holding it back which I'm unaware of. |
I would love to see this also in |
Files identified in the description: If these files are incorrect, please update the |
There definitely seems to be an inconsistency that |
I would also second this, I feel like For example, you could then easily do: (somewhat contrived example) - name: Setup telegraf service
import_role: name="example/telegraf"
vars_files:
- vars/telegraf.yml
- name: Setup telegraf auxillary service
import_role: name="example/telegraf"
vars_files:
- vars/telegraf-aux.yml At the moment the closest you can come to that simplicity is (if you want the tags to work correctly) - name: TELEGRAF | Install and Configure Telegraf
tags: [ telegraf, sometag ]
block:
- include_vars: telegraf.yml
- include_role:
name: "example/telegraf"
apply:
tags: [ telegraf, sometag ] |
Thank you very much for your submission to Ansible. It means a lot to us that you've taken time to contribute. Unfortunately, this issue has been open for some time while waiting for a contributor to take it up but there does not seem to have been anyone that did so. So we are going to close this issue to clear up the queues and make it easier for contributors to browse possible implementation targets. However, we're absolutely always up for discussion. Because this project is very active, we're unlikely to see comments made on closed tickets and we lock them after some time. If you or anyone else has any further questions, please let us know by using any of the communication methods listed in the page below: In the future, sometimes starting a discussion on the development list prior to proposing or implementing a feature can make getting things included a little easier, but it's not always necessary. Thank you once again for this and your interest in Ansible! |
ISSUE TYPE
COMPONENT NAME
import_playbook
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
RHEL 7.4
SUMMARY
Currently it is not possible to use
vars_files
to import variables when usingimport_playbook
. It would be useful for my use case to be able to do this, as I am combining a third-party playbook with a custom inventory file, where the custom inventory file contains placeholders for common variables.I can use
vars
withimport_playbook
, but this means that I cannot leverage my existing common variables and would need to duplicate them.STEPS TO REPRODUCE
EXPECTED RESULTS
I would expect that the above should be possible.
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: