# set\_fact: module: how to use args for complex argumets?

**URL:** <https://forum.ansible.com/t/set-fact-module-how-to-use-args-for-complex-argumets/18827>\
**Category:** Ansible Project\
**Created:** [July 23, 2015, 1:28am UTC](https://forum.ansible.com/t/set-fact-module-how-to-use-args-for-complex-argumets/18827 "2015-07-23T01:28:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Erik\_Steffl](https://avatars.discourse-cdn.com/v4/letter/e/9de0a6/32.png) [@Erik\_Steffl](https://forum.ansible.com/u/Erik_Steffl)\
**Post date:** [July 23, 2015, 1:28am UTC](https://forum.ansible.com/t/set-fact-module-how-to-use-args-for-complex-argumets/18827/1 "2015-07-23T01:28:37Z")

</div>

Ansible set\_fact documentation [http://docs.ansible.com/ansible/set\_fact\_module.html](http://docs.ansible.com/ansible/set_fact_module.html) says “Or alternatively, accepts complex arguments using the args: statement”. How do I use “args”?

So far I figured out that this works (using it in tasks array):

{  
“local\_action”: {  
“module”: “set\_fact”,  
“git\_version”: “HEAD”  
},  
}

which is almost great but this way of specifying variables does not allow to set variable names “module” given that “module” is the name of the module.

When I use “args” as a key it just becomes a variable…

Is there a better way to specify a dictionary/map for the module (using the style above. not the other one where the module name is the main key).

Thanks!

erik
