# ansible 2.1.1, yum install and disabled respositories

**URL:** <https://forum.ansible.com/t/ansible-2-1-1-yum-install-and-disabled-respositories/22665>\
**Category:** Ansible Project\
**Created:** [September 28, 2016, 1:47pm UTC](https://forum.ansible.com/t/ansible-2-1-1-yum-install-and-disabled-respositories/22665 "2016-09-28T13:47:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheUnicornXXL](https://avatars.discourse-cdn.com/v4/letter/t/ea5d25/32.png) [@TheUnicornXXL](https://forum.ansible.com/u/TheUnicornXXL)\
**Post date:** [September 28, 2016, 1:47pm UTC](https://forum.ansible.com/t/ansible-2-1-1-yum-install-and-disabled-respositories/22665/1 "2016-09-28T13:47:04Z")

</div>

Hi,

I use ansible 2.1.1 and have a problem with "yum install" if the used  
repository is disabled.

Here the task:

- name: Bareos-fd installieren / RedHat family  
&nbsp;&nbsp;yum: name={{item}} state=latest  
&nbsp;&nbsp;with\_items:  
&nbsp;&nbsp;&nbsp;&nbsp;- bareos-client

With disabled repository I get the following response:

---

<div class="post-metadata">

**Author:** ![Vince\_Skahan](https://avatars.discourse-cdn.com/v4/letter/v/5e9695/32.png) [@Vince\_Skahan](https://forum.ansible.com/u/Vince_Skahan)\
**Post date:** [September 29, 2016, 7:09pm UTC](https://forum.ansible.com/t/ansible-2-1-1-yum-install-and-disabled-respositories/22665/2 "2016-09-29T19:09:51Z")

</div>

Sounds like it’s doing the correct thing.

Perhaps add the “enablerepo” option to your playbook ?  
[http://docs.ansible.com/ansible/yum\_module.html](http://docs.ansible.com/ansible/yum_module.html)

---

<div class="post-metadata">

**Author:** ![TheUnicornXXL](https://avatars.discourse-cdn.com/v4/letter/t/ea5d25/32.png) [@TheUnicornXXL](https://forum.ansible.com/u/TheUnicornXXL)\
**Post date:** [September 29, 2016, 10:06pm UTC](https://forum.ansible.com/t/ansible-2-1-1-yum-install-and-disabled-respositories/22665/3 "2016-09-29T22:06:57Z")

</div>

Hi Vince,

why? Without enabled repository you get normal the info there is nothing  
to update. Here the same, there is a "OK", not an error... but ansible  
stops the playbook.

Regards

Stefan
