Re: [ansible-project] import_tasks: vs include: when using when: conditional

2019-08-06 Thread Matt Martz
To start, I'll say, don't use `include` any more. It has been replaced by `import_tasks` and `include_tasks`. The behavior of `include` was hard to reason about, and as such we are in the process of deprecating it. Now as for the differences: `import_tasks` is a pre-processor, that is parsed an

Re: [ansible-project] import_tasks: vs include: when using when: conditional

2019-08-05 Thread Sebastian Meyer
Hi Bob, On 05.08.19 23:21, Bob Tanner wrote: > Simple tasks, where I want the "Remote git configuration" task to only be > run when apache2_configuration == 'git' > > I do not understand why import_tasks: or include: is importing/including > remote-git.yml when apache2_configuration is not equ

[ansible-project] import_tasks: vs include: when using when: conditional

2019-08-05 Thread Bob Tanner
Simple tasks, where I want the "Remote git configuration" task to only be run when apache2_configuration == 'git' - debug: msg: "DEBUG: {{ apache2_configuration }}" tags: apache2-servers - name: Remote git configuration import_tasks: remote-git.yml when: apache2_configuration == 'git'