# Disabling all repo in ansible yum module

**URL:** <https://forum.ansible.com/t/disabling-all-repo-in-ansible-yum-module/27597>\
**Category:** Ansible Developer\
**Created:** [May 23, 2018, 4:43am UTC](https://forum.ansible.com/t/disabling-all-repo-in-ansible-yum-module/27597 "2018-05-23T04:43:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ravikumar\_Wagh](https://avatars.discourse-cdn.com/v4/letter/r/a183cd/32.png) [@Ravikumar\_Wagh](https://forum.ansible.com/u/Ravikumar_Wagh)\
**Post date:** [May 23, 2018, 4:43am UTC](https://forum.ansible.com/t/disabling-all-repo-in-ansible-yum-module/27597/1 "2018-05-23T04:43:36Z")

</div>

Hello,

Is there any way in ansible playbook to disable all repositories while installing an package with yum.

I know below way to disable.

yum:  
name: \<package\_name\>  
disablerepo: repo1, repo2,…repo n  
state: present

But I wish to know, is there any shorter way than specifying all repo name in front of disablerepo. like below

yum:  
name: \<package\_name\>  
disablerepo: \*  
state: present

or

yum:  
name: \<package\_name\>  
disablerepo: all  
state: present

Help appreciated.

Thank you !!
