# bug in shell module?

**URL:** <https://forum.ansible.com/t/bug-in-shell-module/11949>\
**Category:** Ansible Project\
**Tags:** ansible-project\
**Created:** [October 1, 2012, 1:37pm UTC](https://forum.ansible.com/t/bug-in-shell-module/11949 "2012-10-01T13:37:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniel\_Hokka\_Zakriss](https://avatars.discourse-cdn.com/v4/letter/d/f05b48/32.png) [@Daniel\_Hokka\_Zakriss](https://forum.ansible.com/u/Daniel_Hokka_Zakriss)\
**Post date:** [October 1, 2012, 1:37pm UTC](https://forum.ansible.com/t/bug-in-shell-module/11949/1 "2012-10-01T13:37:29Z")

</div>

Tchoum wrote:

> Hi there!
> 
> I have a task in my playbook :
> 
> - name: Get date  
> &nbsp;&nbsp;action: shell echo $(date +%Y%m%d\_+%H%M%S)  
> &nbsp;&nbsp;register: DATE
> 
> When I look at the result with ${DATE.stdout}, instead of having  
> '20121001\_+062126' I get '$(date +%Y%m%d\_+%H%M%S)'... which is very bad  
> for  
> a date
> 
> I took a look in the command module code and did a dump of the args  
> variable, and it seems to contain values protected with quotes like :  
> args = "echo '$(date' '+%Y%m%d\_+%H%M%S)'" instead of  
> args = "echo $(date +%Y%m%d\_+%H%M%S)" wich works good 🙂
> 
> thank you for your help!

Should be fixed as of a few hours ago, so a new pull should fix this for you.

Daniel

---

<div class="post-metadata">

**Author:** ![Tchoum](https://avatars.discourse-cdn.com/v4/letter/t/dc4da7/32.png) [@Tchoum](https://forum.ansible.com/u/Tchoum)\
**Post date:** [October 2, 2012, 5:28am UTC](https://forum.ansible.com/t/bug-in-shell-module/11949/2 "2012-10-02T05:28:05Z")

</div>

Thanks!
