I'm trying to find an easy way to specify args to a command.
The args contain '=' signs triggering the error

A variable inserted a new parameter into the module args. Be sure to quote 
variables if they contain equal signs (for example: "{{var}}").

Can you help me find the magic syntax?

- hosts: somehost
  vars:
    - container_commands:
        ops_registry_1: -e SOMEVAR='122' -e bla='123' -e another='1233'
   - container_name: ops_registry_1
  tasks:
     - name: run docker command
       raw: "docker run {{ container_commands[container_name] }} registry:2.0"

I've considered:

   - putting all the args in a environment hash and join them, but I guess 
   it's the same issue.
   - using with_items but this gave the same issue
   - using single , double etc.. quotes


thanks for your assistance

-- 
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/f1b425af-b131-40c2-bbbb-77ccaefbb3c0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to