willthames/ansible-lint — pull request #35 by wybczu (2014-12-05 11:37:07+00:00)
Title: Skip includes which contain variables in path

Unfortunately I have to use variables inside `include` path - ansible-lint cannot lint following `test.yml` playbook:

```
# test.yml
- name: test
connection: local
hosts: localhost
tasks:
- debug: msg="Hello world from test.yml!"
- include: "test-{{ name }}.yml"
```

```
# test-x.yml
- name: test
connection: local
hosts: localhost
tasks:
- debug: msg="Hello world from test-{{ name }}.yml!"
```

Ansible output:

```
$ ansible-playbook -i localhost, test.yml -e 'name=x'

PLAY [test] *******************************************************************

GATHERING FACTS ***************************************************************
ok: [localhost]

TASK: [debug msg="Hello world test.yml!"] *************************************
ok: [localhost] => {
"msg": "Hello world test.yml!"
}

PLAY [test] *******************************************************************

GATHERING FACTS ***************************************************************
ok: [localhost]

TASK: [debug msg="Hello world from test-{{ name }}.yml!"] *********************
ok: [localhost] => {
"msg": "Hello world from test-x.yml!"
}

PLAY RECAP ********************************************************************
localhost : ok=4 changed=0 unreachable=0 failed=0
```

It is possible to evaluate path before `shlex.split()` but we can't be sure, that required var will be set.