# Doubts using local\_action, module, and with\_items all together

**URL:** <https://forum.ansible.com/t/doubts-using-local-action-module-and-with-items-all-together/25673>\
**Category:** Ansible Project\
**Tags:** ubuntu, ansible-lint\
**Created:** [October 3, 2017, 8:36pm UTC](https://forum.ansible.com/t/doubts-using-local-action-module-and-with-items-all-together/25673 "2017-10-03T20:36:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Helio\_Campos\_Mello\_d](https://avatars.discourse-cdn.com/v4/letter/h/85f322/32.png) [@Helio\_Campos\_Mello\_d](https://forum.ansible.com/u/Helio_Campos_Mello_d)\
**Post date:** [October 3, 2017, 8:36pm UTC](https://forum.ansible.com/t/doubts-using-local-action-module-and-with-items-all-together/25673/1 "2017-10-03T20:36:28Z")

</div>

Hi guys,

- I looked for many places but could not find an answer of why this could be happening. I have the following play and its giving lots of headaches:

**Environment:**

`  
$ uname -v  
#39~16.04.1-Ubuntu SMP Wed Sep 13 09:02:42 UTC 2017  
$ uname -r  
4.10.0-35-generic  
$ pip freeze | grep ansible

ansible==2.5.0  
ansible-lint==3.4.16  
$ python --version

Python 2.7.12+

`

**Code being tested:**

`

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [October 3, 2017, 8:54pm UTC](https://forum.ansible.com/t/doubts-using-local-action-module-and-with-items-all-together/25673/2 "2017-10-03T20:54:27Z")

</div>

with\_items is a task keyword, not a module option, 'outdent' it to  
match local\_action

---

<div class="post-metadata">

**Author:** ![Helio\_Campos\_Mello\_d](https://avatars.discourse-cdn.com/v4/letter/h/85f322/32.png) [@Helio\_Campos\_Mello\_d](https://forum.ansible.com/u/Helio_Campos_Mello_d)\
**Post date:** [October 3, 2017, 9:33pm UTC](https://forum.ansible.com/t/doubts-using-local-action-module-and-with-items-all-together/25673/3 "2017-10-03T21:33:11Z")

</div>

Hi Brian,

- First of all, thanks for the fast response. I’ve made what you asked:

`

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [October 3, 2017, 9:39pm UTC](https://forum.ansible.com/t/doubts-using-local-action-module-and-with-items-all-together/25673/4 "2017-10-03T21:39:28Z")

</div>

you are also incorrectly indenting all the options for file and you  
have both module: and file: ... which does not seem as what you wanted  
to do.

---

<div class="post-metadata">

**Author:** ![Helio\_Campos\_Mello\_d](https://avatars.discourse-cdn.com/v4/letter/h/85f322/32.png) [@Helio\_Campos\_Mello\_d](https://forum.ansible.com/u/Helio_Campos_Mello_d)\
**Post date:** [October 4, 2017, 12:21pm UTC](https://forum.ansible.com/t/doubts-using-local-action-module-and-with-items-all-together/25673/5 "2017-10-04T12:21:58Z")

</div>

Hi Brian,

- You were right. I’ve made these changes and it worked.

`
