How to remove yum repository using Ansible playbook

0 votes

Hi Guys,

I am new in the Ansible playbook. I have configured yum in my remote systems. Now I want to remove yum from my remote systems. How can I do that?

Aug 4, 2020 in Ansible by akhtar
• 38,260 points
4,341 views

1 answer to this question.

0 votes

Hi@akhtar,

You can use the yum_repository module in Ansible-playbook. This allows us to configure or remove yum in the remote nodes. You need to set state value as absent.

- hosts: all
  tasks:
  - name: Remove repository (and clean up left-over metadata)
    yum_repository:
      name: epel
      file: docker_repo
      state: absent
answered Aug 4, 2020 by MD
• 95,460 points

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,680 points
1,134 views
0 votes
1 answer

How to remove cron using Ansible

Hey @Likhit, You could use something like ...READ MORE

answered Jan 29, 2019 in Ansible by Kavya
4,621 views
0 votes
1 answer
+1 vote
1 answer

How to deploy war file into the Websphere using ansible playbook

Hi@M, You can use the below-given example. - name: ...READ MORE

answered Jun 29, 2020 in Ansible by MD
• 95,460 points
2,394 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,035 views
+2 votes
1 answer
0 votes
1 answer

How to configure yum using Ansible Playbook?

Hi@akhtar, You need to use the yum_repository module ...READ MORE

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

How to remove an S3 bucket using Ansible playbook?

Hi@akhtar, You can create or remove an S3 ...READ MORE

answered Dec 4, 2020 in Ansible by MD
• 95,460 points
1,292 views
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