How to configure yum using Ansible Playbook

0 votes

Hi Guys,g

I am new in Ansible. I want to configure yum in all the nodes using Ansible-playbook. How can I do that?

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

1 answer to this question.

0 votes

Hi@akhtar,

You need to use the yum_repository module in your ansible-playbook. This is used to configure yum in the managed nodes. You can add the below-given lines in your playbook.

- hosts: all
  tasks:
  - name: Add multiple repositories into the same file (1/2)
    yum_repository:
      name: docker
      description: EPEL YUM repo
      file: docker_repo
      baseurl: https://download.docker.com/linux/centos/7/x86_64/stable/
      gpgcheck: 0
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,099 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,345 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
3,942 views
+2 votes
1 answer
0 votes
1 answer

How to configure httpd web server using Ansible Playbook?

Hi@akhtar, You need to write one program file ...READ MORE

answered Jul 30, 2020 in Ansible by MD
• 95,460 points
3,315 views
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,205 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