We've seen this requested several times, but it is normally an
indicator of people making plays/roles way too big.
So we recommend actually splitting the playbook/roles into the more
manageable units instead of implementing this kind of functionality or
using a workaround via conditionals.
--
Thanks Vladimir
I didn't heard about tasks_from.
I'll test it too
Le mercredi 24 février 2021 à 18:29:45 UTC+1, vbo...@gmail.com a écrit :
> On Wed, 24 Feb 2021 09:05:27 -0800 (PST)
> Mouton Noir wrote:
>
> > Every task in the main.yml from "myrole" are conditioned with a
> different
> >
On Wed, 24 Feb 2021 09:05:27 -0800 (PST)
Mouton Noir wrote:
> Every task in the main.yml from "myrole" are conditioned with a different
> value for a variable myowntags
> ex:
> when: myowntags == "fst-openshot"
>
> Then, in a taskfile or playbook, I can select the tasks I want with
>
I finally found a "trick" that made it for me :
Every task in the main.yml from "myrole" are conditioned with a different
value for a variable myowntags
ex:
when: myowntags == "fst-openshot"
Then, in a taskfile or playbook, I can select the tasks I want with
something like :
- name: test
Thanks Matt for your quick answer... Even if it doesn't arrange me... ;-)
It's weird this is not possible. I'm surprised. I guess I'm not the first
one to consider doing this. Is there a reason why ?
Did you (or someone else) hear about a "trick" to get a similar behaviour
using something else ?
There is no capability to limit tags from within a playbook. Tags can only
be limited from the CLI via -t/--tags
On Wed, Feb 24, 2021 at 10:15 AM Mouton Noir
wrote:
> Hi,
>
> I'd like to use tags to select tasks I launch.
> I found documentations about how to limit playbook, role... execution
Hi,
I'd like to use tags to select tasks I launch.
I found documentations about how to limit playbook, role... execution to
the tagged tasks l choose from adhoc command (-t option).
But I need to do the same from another playbook... and I can't find
anything about that
ex :
extract from the