Hello  Team,

I want to clone the git repository using ansible Cron module. I am trying 
to change the local repository for every 5 mintes using Cron module in 
ansible playbook. For that i wrote the code as below.

*The below cron job is not working for git clone*.

  - cron:
      name: "download the git folder using cron jobs"
      minute: "5"
      job: 'sudo "git clone --depth=1 --force=yes 
https://github.com/Msutapalli/openwhisk.git";  > /home/ec2-user/siva/openw/'
      cron_file: "/etc/crontab"
      state: present
      user: ec2-user
      user: root


 But for sample  

  - cron:
      name: "Sample hello"
      minute: "5"
      job: 'sudo echo " heloworld " > /home/ec2-user/hello.txt'
      cron_file: "/etc/crontab"
      state: present
      user: ec2-user
      user: root

It is working fine.

where i did wrong in my *'job: ' *command.

Thanks in advance

-- 
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/0fe724ce-685f-45e2-963e-ddff09ed98c7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to