Quoting balubhai555 (balubhai...@gmail.com):

> I want to clone the git repository using ansible Cron module.

So why not create a playbook that does this and run it from cron? ;)

> *The below cron job is not working for git clone*.
> job: 'sudo "git clone --depth=1 --force=yes 
> https://github.com/Msutapalli/openwhisk.git";  > /home/ec2-user/siva/openw/'

Drop the double quotes.
Also, a filename seems to be missing in your stdout redirection.

$ sudo "git help"
sudo: git help: command not found

$ sudo git help
usage: git [--version] [--help] [-C <path>] [-c name=value]
[..]

>  But for sample  
> job: 'sudo echo " heloworld " > /home/ec2-user/hello.txt'
> It is working fine.

Notice 'echo' is not in the double quotes.

-Sndr.
-- 
| A ship shipping ship shipping shipping ships!
| 4096R/20CC6CD2 - 6D40 1A20 B9AA 87D4 84C7  FBD6 F3A9 9442 20CC 6CD2

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/20170427155835.GD2172%40dot.dmz.freshdot.net.
For more options, visit https://groups.google.com/d/optout.

Reply via email to