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 in Ansible by akhtar
• 25,030 points
55 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 by MD
• 56,480 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,620 points
212 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 in Ansible by MD
• 56,480 points
224 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 26, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
677 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 in Ansible by MD
• 56,480 points
76 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 in Ansible by MD
• 56,480 points
68 views