# Adding a repo file before doing a yum install

**URL:** <https://forum.ansible.com/t/adding-a-repo-file-before-doing-a-yum-install/24437>\
**Category:** Ansible Project\
**Created:** [May 9, 2017, 7:01pm UTC](https://forum.ansible.com/t/adding-a-repo-file-before-doing-a-yum-install/24437 "2017-05-09T19:01:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nicholas\_Sheridan](https://avatars.discourse-cdn.com/v4/letter/n/ecb155/32.png) [@Nicholas\_Sheridan](https://forum.ansible.com/u/Nicholas_Sheridan)\
**Post date:** [May 9, 2017, 7:01pm UTC](https://forum.ansible.com/t/adding-a-repo-file-before-doing-a-yum-install/24437/1 "2017-05-09T19:01:58Z")

</div>

Hi forum **newbie alert**

I want to do this:  
sudo vi /etc/yum.repos.d/kibana.repo

[kibana-4.4]  
name=Kibana repository for 4.4.x packages  
baseurl=[http://packages.elastic.co/kibana/4.4/centos](http://packages.elastic.co/kibana/4.4/centos)  
gpgcheck=1  
gpgkey=[http://packages.elastic.co/GPG-KEY-elasticsearch](http://packages.elastic.co/GPG-KEY-elasticsearch)  
enabled=1

sudo yum -y install kibana

So I think I would normally do this:

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [May 10, 2017, 10:53am UTC](https://forum.ansible.com/t/adding-a-repo-file-before-doing-a-yum-install/24437/2 "2017-05-10T10:53:16Z")

</div>

You are talking about yum but uses the apt module, that should be yum I presume.

You have all the modules here  
[https://docs.ansible.com/ansible/list\_of\_all\_modules.html](https://docs.ansible.com/ansible/list_of_all_modules.html)

and if you search for yum you'll find

yum\_repository - Add or remove YUM repositories  
[https://docs.ansible.com/ansible/yum\_repository\_module.html](https://docs.ansible.com/ansible/yum_repository_module.html)

You can also find the documentation on the command line like this.

$ ansible-doc --list|grep yum  
yum Manages packages with the `yum' package manager  
yum\_repository Add or remove YUM repositories

To get the documentation on the yum\_repository module  
$ ansible-doc yum\_repository

---

<div class="post-metadata">

**Author:** ![Nicholas\_Sheridan](https://avatars.discourse-cdn.com/v4/letter/n/ecb155/32.png) [@Nicholas\_Sheridan](https://forum.ansible.com/u/Nicholas_Sheridan)\
**Post date:** [May 12, 2017, 8:07am UTC](https://forum.ansible.com/t/adding-a-repo-file-before-doing-a-yum-install/24437/3 "2017-05-12T08:07:29Z")

</div>

Thanks Kai I’ll check this out!
