# Unable to run two commands simultaneously

**URL:** <https://forum.ansible.com/t/unable-to-run-two-commands-simultaneously/26944>\
**Category:** Ansible Project\
**Created:** [March 9, 2018, 4:01pm UTC](https://forum.ansible.com/t/unable-to-run-two-commands-simultaneously/26944 "2018-03-09T16:01:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dave](https://avatars.discourse-cdn.com/v4/letter/d/ee7513/32.png) [@Dave](https://forum.ansible.com/u/Dave)\
**Post date:** [March 9, 2018, 4:01pm UTC](https://forum.ansible.com/t/unable-to-run-two-commands-simultaneously/26944/1 "2018-03-09T16:01:36Z")

</div>

I’m trying to figure out where I’m going wrong here. I have two raw commands to run, one of which concatenates and copies two files into one and the other just overwrites another file and I’m getting a syntax error on the command: “{{ item }}” when I try to run the script. I tried encapsulating both ‘cat’ commands into quotes but that didn’t seem to help. Is there something I might be doing wrong here? My original .yml file has another {{ item }} for a separate task that I didn’t include and I’m not sure if Ansible can differentiate between the two if they’re both in separate tasks.

`

---

<div class="post-metadata">

**Author:** ![sivel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sivel/32/1198_2.png) [@sivel](https://forum.ansible.com/u/sivel)\
**Post date:** [March 9, 2018, 4:15pm UTC](https://forum.ansible.com/t/unable-to-run-two-commands-simultaneously/26944/2 "2018-03-09T16:15:49Z")

</div>

The `with_items` keyword is indented too far. It should be in alignment with `command` and `name`, and not nested underneath.

It is a task keyword, as opposed to a module argument.

---

<div class="post-metadata">

**Author:** ![Dave](https://avatars.discourse-cdn.com/v4/letter/d/ee7513/32.png) [@Dave](https://forum.ansible.com/u/Dave)\
**Post date:** [March 9, 2018, 4:19pm UTC](https://forum.ansible.com/t/unable-to-run-two-commands-simultaneously/26944/3 "2018-03-09T16:19:27Z")

</div>

Good catch. Thanks.
