# playbook error for external parameter

**URL:** <https://forum.ansible.com/t/playbook-error-for-external-parameter/27745>\
**Category:** Ansible Project\
**Created:** [June 8, 2018, 7:00am UTC](https://forum.ansible.com/t/playbook-error-for-external-parameter/27745 "2018-06-08T07:00:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![SUMIT\_SAHAY](https://avatars.discourse-cdn.com/v4/letter/s/97f17d/32.png) [@SUMIT\_SAHAY](https://forum.ansible.com/u/SUMIT_SAHAY)\
**Post date:** [June 8, 2018, 7:00am UTC](https://forum.ansible.com/t/playbook-error-for-external-parameter/27745/1 "2018-06-08T07:00:18Z")

</div>

Hi All,

I am having one issue,

-e’switch\_desc=“interface Gi1/0/16”’

Created ansible playbook for ios\_config but when passing the external parameter I am getting one error of Incomplete command as it is reading only “interface” and skipping “Gi1/0/16” this.

I am running my ansible playbook using ssh like below

ssh user@host\_ip -C ansible-playbook -i ./hosts /ansibleplaybooks/switch\_conf\_desc.yml -e’switch\_desc=“interface Gi1/0/16”’ --limit host\_name

like this I am running my ansible playbook.

Looking forward for your reply.

Thanks & Regards  
Sumit Sahay

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [June 8, 2018, 8:09am UTC](https://forum.ansible.com/t/playbook-error-for-external-parameter/27745/2 "2018-06-08T08:09:56Z")

</div>

I can't confirm this behavior, so you must have something wrong in the code you are not showing us.

test.yml

---

<div class="post-metadata">

**Author:** ![SUMIT\_SAHAY](https://avatars.discourse-cdn.com/v4/letter/s/97f17d/32.png) [@SUMIT\_SAHAY](https://forum.ansible.com/u/SUMIT_SAHAY)\
**Post date:** [June 8, 2018, 9:13am UTC](https://forum.ansible.com/t/playbook-error-for-external-parameter/27745/3 "2018-06-08T09:13:45Z")

</div>

Hi Kai Stian Olstad,

First of all thanks for your reply.  
Correct even I am able to run the playbook by using below command, my issue is not this.

I am running my playbook by using ssh like this

ssh user\_name@host\_ip -C ansible-playbook -i ./hosts /ansibleplaybooks/switch\_conf\_desc.yml -e’switch\_desc=“interface Gi1/0/16”’ --limit host\_name

like above and getting below message only

TASK [debug] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
ok: [host\_ip] =\> {  
“changed”: false,  
“msg”: “interface”  
}

only it is taking “interface” not the full string.

that is why I am not able to run this.

Looking forward for your reply.

Regards  
Sumit Sahay

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [June 8, 2018, 4:55pm UTC](https://forum.ansible.com/t/playbook-error-for-external-parameter/27745/4 "2018-06-08T16:55:51Z")

</div>

To be fair this is not a Ansible problem as you see the Ansible run does work.

It has to do with the shell you are using, try escaping you single quotes, if that doesn't work you probably should find the support list for your shell and ask there.

---

<div class="post-metadata">

**Author:** ![SUMIT\_SAHAY](https://avatars.discourse-cdn.com/v4/letter/s/97f17d/32.png) [@SUMIT\_SAHAY](https://forum.ansible.com/u/SUMIT_SAHAY)\
**Post date:** [June 11, 2018, 9:12am UTC](https://forum.ansible.com/t/playbook-error-for-external-parameter/27745/5 "2018-06-11T09:12:11Z")

</div>

Hi All,

As per my conversation with Kai Stian Olstad, my issue is not related with ansible but how would I resolve the issue,

As it is not taking full string as parameter skipping the space in between the parameter.

Looking forward for reply.

Thanks & Regards  
Sumit Sahay
