--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAM19uTCnyStH4yH9hkLg58T2MqG5Vv9CWXR1FB11%3D5hBkvXcdQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
On Thu, Jul 17, 2014 at 2:53 AM, Michael DeHaan <mic...@ansible.com> wrote:
Take a look at the "allow_duplicates" parameter.
This does not solve my problem.
I’m happy with the default (allow_duplicates=no
). My issue is that it only prevents the same role from executing multiple times as a dependency. If the same role is also listed somewhere in the playbook (in addition to being a dependency), allow_duplicates
is irrelevant (currently).
I am looking for the equivalent of having allow_duplicates
affect that role everywhere, whether it is being executed as a dependency, or explicitly due to being listed in a play.
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAM19uTCNcd7aCkn44RZRtctnxf3dOt8KCUodQw_buMvQO_Puig%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAM19uTCnyStH4yH9hkLg58T2MqG5Vv9CWXR1FB11%3D5hBkvXcdQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
DevOps Manager
Swiss Mobility
Solutions
a Gemalto Company
Av. Locutor Vicente
Hipólito 39
03540 Alicante Spain
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/53C77BEF.9060002%40swissms.ch.
Right! Good plan.You could do a "set_fact: role_has_executed=1" at the end of the roleand then on the role:- role: { name: foo, when: "role_has_executed is defined" }
Even if a role ends up being a no-op, it takes time. This makes playbook execution slower, which is annoying.
On Fri, Jul 18, 2014 at 4:34 AM, Michael DeHaan <mic...@ansible.com> wrote:
Role dependencies can have parameters.
Isn’t that what allow_duplicates=yes
is for?
Wouldn’t it be more consistent for allow_duplicates
not to discriminate between executing the role explicitly or as a dependency?
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAM19uTDoQ1ZBEyEWk63SHwkGX3p4o9rrP4frvyvYZN8yuZVr%3Dw%40mail.gmail.com.
On Fri, Jul 18, 2014 at 2:40 PM, Michael DeHaan <mic...@ansible.com> wrote:
There are cases (again, parameterized roles) - different roles can have the same dependency with different parameters, where that doesn't make sense.)
AFAIU, this is exactly the use case for allow_duplicates=yes
, isn’t it? It would allow the role to be executed multiple times to accommodate the different parameters. What doesn’t make sense here?
On the other hand, currently, setting allow_duplicates=no
does not help parameterized roles, nor does it help the execute at most once use case. It allows multiple executions if the role is listed explicitly and is also a dependency.
it sounds like some people may like a role metadata parameter that is different from this, that is not allow_duplicates, that is something like once_per_play or something.
What I’m after is not once_per_play, it’s absolutely once, no matter how many times the role is listed in top-level or included plays, and no matter how many times it’s pulled in as a dependency.
If we forget about dependencies for a bit, and consider the case where a role is listed in two plays, which are both included in a top-level role. Should that role be executed multiple times even when allow_duplicates=no
?
allow_duplicates=yes
, isn’t it? "allow_duplicates=no
?"--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAM19uTBzy2Lfi21v%2BCmP%2BLa6mECYewwFP%2BV1%3DMgmtP-feBvS%3Dw%40mail.gmail.com.