Perform Cron job in ansible playbook on ec2-user

23 views
Skip to first unread message

Balu Kompalli

unread,
Mar 28, 2017, 11:55:20 AM3/28/17
to Ansible Project
Hello Team,

I am working on the cron jobs in Ansible. I want to perform cron jobs operations on AWS ec2 instance. I got success status on ec2 instance in the control machine while i have ran the playbook. But within the instance, when i tries the "crontab  -l" command, it gave

"No cron jobs available for ec2-user"

I want the git modifications in the ec2 iinstance. So please help me out.
This is my playbook part. Please help me to activate my task on ec2 instance. 


Thank you.


 - name: cron jobs
    cron:
      name: cloning from git
      minute: 4
      job: sudo git clone https://github.com/AAA/openwhisk.git
      user: ec2-user

Reply all
Reply to author
Forward
0 new messages