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 ?

Regards
Le mercredi 24 février 2021 à 17:24:04 UTC+1, Matt Martz a écrit :

> 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 <the.m0u...@gmail.com> wrote:
>
>> 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 main.yml from role "myrole" :
>> ************************************************************
>> - name: Installation Nutrilog
>>   import_tasks: nutrilog.yml
>>   tags:
>>     - fst-nutrilog
>>
>> - name: Installation Openshot
>>   import_tasks: 
>> /etc/ansible/roles/fst-win/tasks/win_install_freelog_task_fst.yml
>>   vars:
>>     logiciel: "Openshot"
>>   tags:
>>     - fst-openshot
>> ************************************************************
>>
>> I'd like to be able to get choose the tagged tasks when 
>> including/importing it in a task file, using something like :
>> include_roles :
>>   name: myrole
>>   tags: fst-openshot
>>
>> What did I miss ?
>>
>> -- 
>> 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 view this discussion on the web visit 
>> https://groups.google.com/d/msgid/ansible-project/e3a72e51-ecf0-41eb-8ca0-96e42f677371n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/ansible-project/e3a72e51-ecf0-41eb-8ca0-96e42f677371n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>
>
> -- 
> Matt Martz
> @sivel
> sivel.net
>

-- 
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-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/57a7624b-c54e-4424-8430-0b3b14b354fcn%40googlegroups.com.

Reply via email to