bug in shell module?

Tchoum wrote:

Hi there!

I have a task in my playbook :

- name: Get date
  action: shell echo $(date +%Y%m%d_+%H%M%S)
  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 :slight_smile:

thank you for your help!

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

Daniel

Thanks!