How to remove cron using Ansible

0 votes
I'm trying to remove all the crons from my playbook. How do I do this?
Jan 29, 2019 in Ansible by Likhit
4,623 views

1 answer to this question.

0 votes

Hey @Likhit, You could use something like this:

---
- hosts: all
  user: <user_name>
  tasks:
  - name: disable cron
    cron:
      name: clean
      env: yes
      state: absent
      user: root
    become: True
answered Jan 29, 2019 by Kavya

Related Questions In Ansible

0 votes
1 answer

How to remove yum repository using Ansible playbook?

Hi@akhtar, You can use the yum_repository module in ...READ MORE

answered Aug 4, 2020 in Ansible by MD
• 95,460 points
4,342 views
0 votes
1 answer

How to remove old file using Ansible?

Hi@akhtar, You can remove your files using Ansible. ...READ MORE

answered Sep 17, 2020 in Ansible by MD
• 95,460 points
3,597 views
0 votes
1 answer

How to remove duplicate entries from a file using Ansible?

Hi@akhtar, You can use the shell module to do your ...READ MORE

answered Sep 17, 2020 in Ansible by MD
• 95,460 points
4,919 views
0 votes
1 answer

How to run a cron job using Ansible Playbook?

Hi@akhtar, You can use a module named Cron ...READ MORE

answered Sep 29, 2020 in Ansible by MD
• 95,460 points
10,392 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,036 views
+2 votes
1 answer
0 votes
1 answer

How to encrypt and existing file using Ansible Vault?

Hey @Kyraa, to encrypt an existing file ...READ MORE

answered Jan 29, 2019 in Ansible by Kavya
3,453 views
+1 vote
3 answers
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP