-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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
allow_duplicates
does not allow a role and its dependencies to be run multiple times
#11205
Comments
Hi, I encountered the same issue when I was provisioning some of my server machines. Trying to find a solution I've stumbled upon The only workaround I can think of is to use |
@LuedDev Yeah, I thought "oh, include should be fine", until I realized it breaks all of the variables defined in the roles as well as the tasks that include templates and files. So it's not much of a workaround unfortunately. |
+1 |
@dellis23 about to push a fix up for this, but I do notice one mistake in your example above: you need to specify |
Closing This TicketHi! We believe the above commit should resolve this problem for you. This will also be included in the next major release. If you continue seeing any problems related to this issue, or if you have any further questions, please let us know by stopping by one of the two mailing lists, as appropriate:
Because this project is very active, we're unlikely to see comments made on closed tickets, but the mailing list is a great way to ask questions, or post if you don't think this particular issue is resolved. Thank you! |
Thank you @jimi-c ! Looking forward to trying it out. |
Issue Type:
Bug Report
Ansible Version:
Ansible Configuration:
N/A
Environment:
Mac OSX 10.9.5
Summary:
Roles that are included multiple times cannot have their dependencies included multiple times. The documentation states that
allow_duplicates
accomplish something like this so long as the dependency is included multiple times from the same role, but it does not seem to work for the aforementioned case.Steps To Reproduce:
Here's a simple set of playbooks / roles that should illustrate the problem.
Expected Results:
Running the first playbook,
hypervisor-1.yml
, should give output that shows a disk is set up for bothred
andblue
, as well as the installation of the VM for both.Actual Results:
Note the disk is only set up for
red
and is skipped forblue
.The text was updated successfully, but these errors were encountered: