On Wed, 6 Nov 2019 05:56:46 -0500
Mauricio Tavares <
raub...@gmail.com> wrote:
> - include: string.yml
> when: string_test|default(False)
> [...]
> TASK [test : Create strings] **************************************
> *
> skipping: [testmail]
> [...]
> which are listing tasks inside string.yml. Yes, it is skipping said
> tasks but I thought it would not try to peek at that task file to
> begin with. Is that expected behaviour or I did something wrong?
Use *include_tasks* instead of *include*.
Quoting:"Prior to Ansible 2.4, only include was available and it behaved
differently depending on context". See "Including and Importing"
https://docs.ansible.com/ansible/latest/user_guide/playbooks_reuse_includes.html#including-and-importing
Cheers,
-vlado