There's no parameter named "free_form" to this module. In the docs, this just means that the argument is a string.
On Sun, Mar 23, 2014 at 7:11 PM, Charles Duffy <[email protected]> wrote: > 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 > . > > 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.htmldescribes 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: > > action: shell > args: > free_form: echo hello_world >/tmp/something > creates: /tmp/something > > > ...runs the following: > > /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; > hopefully the cross-posting is not frowned on. > > -- > You received this message because you are subscribed to the Google Groups > "Ansible Project" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/23e9664b-2246-494a-b5ce-6c12e4fbbef5%40googlegroups.com<https://groups.google.com/d/msgid/ansible-project/23e9664b-2246-494a-b5ce-6c12e4fbbef5%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAEVJ8QMMhwC%3DYvq7w_Xh4W0VP4SgwLWXAqG56pUFKyXdd5s%3D-A%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
