# Enable copr repository with dnf module

**URL:** <https://forum.ansible.com/t/enable-copr-repository-with-dnf-module/30442>\
**Category:** Ansible Project\
**Tags:** fedora\
**Created:** [May 28, 2019, 8:24pm UTC](https://forum.ansible.com/t/enable-copr-repository-with-dnf-module/30442 "2019-05-28T20:24:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marcin\_Zajaczkowski](https://avatars.discourse-cdn.com/v4/letter/m/f1d935/32.png) [@Marcin\_Zajaczkowski](https://forum.ansible.com/u/Marcin_Zajaczkowski)\
**Post date:** [May 28, 2019, 8:24pm UTC](https://forum.ansible.com/t/enable-copr-repository-with-dnf-module/30442/1 "2019-05-28T20:24:39Z")

</div>

Hi,

I wonder what’s the recommended way to enable a COPR repository in dnf using Ansible?

I could just use a link to:  
[https://copr.fedorainfracloud.org/coprs/vondruch/doublecmd/repo/fedora-30/vondruch-doublecmd-fedora-30.repo](https://copr.fedorainfracloud.org/coprs/vondruch/doublecmd/repo/fedora-30/vondruch-doublecmd-fedora-30.repo)  
(probably with a guard task to prevent an unnecessary network call if already installed)

However, maybe there is some more dedicated way to use a dnf plugin for copr?

Marcin

---

<div class="post-metadata">

**Author:** ![cassell](https://avatars.discourse-cdn.com/v4/letter/c/ecae2f/32.png) [@cassell](https://forum.ansible.com/u/cassell)\
**Post date:** [May 28, 2019, 11:09pm UTC](https://forum.ansible.com/t/enable-copr-repository-with-dnf-module/30442/2 "2019-05-28T23:09:09Z")

</div>

> Hi,
> 
> I wonder what's the recommended way to enable a COPR repository in dnf  
> using Ansible?
> 
> I could just use a link to:  
> [https://copr.fedorainfracloud.org/coprs/vondruch/doublecmd/repo/fedora-30/vondruch-doublecmd-fedora-30.repo](https://copr.fedorainfracloud.org/coprs/vondruch/doublecmd/repo/fedora-30/vondruch-doublecmd-fedora-30.repo)  
> (probably with a guard task to prevent an unnecessary network call if  
> already installed)
> 
> However, maybe there is some more dedicated way to use a dnf plugin for copr?

I don't think it is possible today. I could imagine a yum\_copr/dnf\_copr module to accomplish that goal, or an extra feature to yum\_repository module, however.

> Marcin

V/r,  
James Cassell
