# Help figuring linter fail with conflicting action statements: hosts, tasks

**URL:** <https://forum.ansible.com/t/help-figuring-linter-fail-with-conflicting-action-statements-hosts-tasks/35835>\
**Category:** Ansible Project\
**Tags:** azure, ansible-lint\
**Created:** [October 7, 2021, 10:56pm UTC](https://forum.ansible.com/t/help-figuring-linter-fail-with-conflicting-action-statements-hosts-tasks/35835 "2021-10-07T22:56:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anders\_Goncalves\_da](https://avatars.discourse-cdn.com/v4/letter/a/ce7236/32.png) [@Anders\_Goncalves\_da](https://forum.ansible.com/u/Anders_Goncalves_da)\
**Post date:** [October 7, 2021, 10:56pm UTC](https://forum.ansible.com/t/help-figuring-linter-fail-with-conflicting-action-statements-hosts-tasks/35835/1 "2021-10-07T22:56:44Z")

</div>

Hello. I haven’t been able to find a satisfactory solution to the problem I am having.

The linter throws the following error: [parser-error] conflicting action statements: hosts, tasks

I am running ansible-lint 5.2.0 using ansible 2.11.5.

This is the playbook ([https://docs.microsoft.com/en-us/azure/developer/ansible/vm-configure?tabs=ansible#clean-up-resources](https://docs.microsoft.com/en-us/azure/developer/ansible/vm-configure?tabs=ansible#clean-up-resources)):

---

<div class="post-metadata">

**Author:** ![Anders\_Goncalves\_da](https://avatars.discourse-cdn.com/v4/letter/a/ce7236/32.png) [@Anders\_Goncalves\_da](https://forum.ansible.com/u/Anders_Goncalves_da)\
**Post date:** [October 7, 2021, 11:00pm UTC](https://forum.ansible.com/t/help-figuring-linter-fail-with-conflicting-action-statements-hosts-tasks/35835/2 "2021-10-07T23:00:19Z")

</div>

I should add that this problem also happens with the following example playbook:

[https://docs.ansible.com/ansible/latest/user\_guide/playbooks\_intro.html#playbook-execution](https://docs.ansible.com/ansible/latest/user_guide/playbooks_intro.html#playbook-execution)

But, only for the first play in the playbook.

---

<div class="post-metadata">

**Author:** ![Anders\_Goncalves\_da](https://avatars.discourse-cdn.com/v4/letter/a/ce7236/32.png) [@Anders\_Goncalves\_da](https://forum.ansible.com/u/Anders_Goncalves_da)\
**Post date:** [October 7, 2021, 11:09pm UTC](https://forum.ansible.com/t/help-figuring-linter-fail-with-conflicting-action-statements-hosts-tasks/35835/3 "2021-10-07T23:09:15Z")

</div>

The error seems to stem from the fact that I had it in a folders called tasks instead of a folder called playbook:

[https://github.com/ansible-community/ansible-lint/issues/1471](https://github.com/ansible-community/ansible-lint/issues/1471)

Now the linter is working fine.
