# Using "free-form" arguments with the complex-arg passing syntax

**URL:** <https://forum.ansible.com/t/using-free-form-arguments-with-the-complex-arg-passing-syntax/14835>\
**Category:** Ansible Project\
**Created:** [March 23, 2014, 11:11pm UTC](https://forum.ansible.com/t/using-free-form-arguments-with-the-complex-arg-passing-syntax/14835 "2014-03-23T23:11:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Charles\_Duffy](https://avatars.discourse-cdn.com/v4/letter/c/c2a13f/32.png) [@Charles\_Duffy](https://forum.ansible.com/u/Charles_Duffy)\
**Post date:** [March 23, 2014, 11:11pm UTC](https://forum.ansible.com/t/using-free-form-arguments-with-the-complex-arg-passing-syntax/14835/1 "2014-03-23T23:11:29Z")

</div>

Howdy, all –

I’m generating Ansible playbooks programmatically, and using the complex-args form documented by example at [https://github.com/ansible/ansible-examples/blob/master/language\_features/complex\_args.yml](https://github.com/ansible/ansible-examples/blob/master/language_features/complex_args.yml).

This works well until I try to use a module accepting “free-form” arguments, such as the command or shell modules. (I prefer to use this syntax in such cases to avoid ambiguity around whether arguments containing the literal ‘=’ character are intended to be parsed by Ansible or by the shell being invoked).

For instance, although [http://docs.ansible.com/shell\_module.html](http://docs.ansible.com/shell_module.html) describes a “free\_form” argument as being the appropriate place to pass the actual command to be run, I’m seeing the following behavior in practice:

```auto
action: shell
args:
  free_form: echo hello_world >/tmp/something
  creates: /tmp/something

```

…runs the following:

`

```auto
/bin/sh -c " free_form='echo hello_world >/tmp/something' "

```

`…which is very much not the intent. What’s the right way to pass a free-form argument when using the complex-args form?

PS - I posted this question to ServerFault at [http://serverfault.com/questions/584037/passing-free-form-commands-to-ansible-using-complex-args-form](http://serverfault.com/questions/584037/passing-free-form-commands-to-ansible-using-complex-args-form); hopefully the cross-posting is not frowned on.

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [March 24, 2014, 3:23pm UTC](https://forum.ansible.com/t/using-free-form-arguments-with-the-complex-arg-passing-syntax/14835/2 "2014-03-24T15:23:59Z")

</div>

There’s no parameter named “free\_form” to this module.

In the docs, this just means that the argument is a string.
