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 28 in Ansible by Likhit
422 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 28 by Kavya

Related Questions In Ansible

0 votes
1 answer

devops , how to create user using ansible playbook

root doesn't need a password to switch ...READ MORE

answered Jul 16, 2018 in Ansible by Kalgi
• 2,620 points
128 views
0 votes
1 answer
0 votes
2 answers

How to create MySQL tables using Ansible?

--- - hosts: dbserver   tasks:    - name: create a table ...READ MORE

answered Mar 19 in Ansible by Ankit Tyagi
1,215 views
0 votes
1 answer
+13 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 26, 2018 in DevOps & Agile by DragonLord999
• 8,380 points
203 views
0 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 in Ansible by Kavya
557 views
0 votes
3 answers