community.general.copr – Manage one of the Copr repositories

From Get docs
Ansible/docs/2.11/collections/community/general/copr module


community.general.copr – Manage one of the Copr repositories

Note

This plugin is part of the community.general collection (version 2.0.1).

To install it use: ansible-galaxy collection install community.general.

To use it in a playbook, specify: community.general.copr.


New in version 2.0.0: of community.general


Synopsis

  • This module can enable, disable or remove the specified repository.

Requirements

The below requirements are needed on the host that executes this module.

  • dnf
  • dnf-plugins-core

Parameters

Parameter Choices/Defaults Comments

chroot

string

The name of the chroot that you want to enable/disable/remove in the project, for example epel-7-x86_64. Default chroot is determined by the operating system, version of the operating system, and architecture on which the module is run.

host

string

Default:

"copr.fedorainfracloud.org"

The Copr host to work with.

name

string / required

Copr directory name, for example @copr/copr-dev.

protocol

string

Default:

"https"

This indicate which protocol to use with the host.

state

string

  • absent
  • enabled

  • disabled

Whether to set this project as enabled, disabled or absent.



Notes

Note

  • Supports check_mode.


Examples

- name: Enable project Test of the user schlupov
  community.general.copr:
    host: copr.fedorainfracloud.org
    state: enabled
    name: schlupov/Test
    chroot: fedora-31-x86_64

- name: Remove project integration_tests of the group copr
  community.general.copr:
    state: absent
    name: '@copr/integration_tests'

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description

repo

string

success

Path to the project on the host.


Sample:

copr.fedorainfracloud.org/group_copr/integration_tests

repo_filename

string

success

The name of the repo file in which the copr project information is stored.


Sample:

_copr:copr.fedorainfracloud.org:group_copr:integration_tests.repo




Authors

© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.11/collections/community/general/copr_module.html