community.general.copr 模块 – 管理 Copr 仓库之一
注意
此模块是 community.general 集合 (版本 10.1.0) 的一部分。
如果您正在使用 ansible 包,则可能已经安装了此集合。它不包含在 ansible-core 中。要检查它是否已安装,请运行 ansible-galaxy collection list。
要安装它,请使用:ansible-galaxy collection install community.general。您需要其他要求才能使用此模块,有关详细信息,请参阅 要求。
要在 playbook 中使用它,请指定:community.general.copr。
community.general 2.0.0 中的新增功能
概要
- 此模块可以启用、禁用或删除指定的仓库。 
要求
执行此模块的主机需要以下要求。
- dnf 
- dnf-plugins-core 
参数
| 参数 | 注释 | 
|---|---|
| 您要在项目中启用/禁用/删除的 chroot 名称,例如  | |
| 要排除的包列表。 | |
| 要使用的 Copr 主机。 默认值:  | |
| 要包含的包列表。 | |
| Copr 目录名称,例如  | |
| 这指示要与主机一起使用的协议。 默认值:  | |
| 是否将此项目设置为  选项 
 | 
属性
| 属性 | 支持 | 描述 | 
|---|---|---|
| 支持:完全支持 | 可以在  | |
| 支持:不支持 | 在差异模式下,将返回有关已更改内容(或可能需要在  | 
注释
注意
- 支持 - check_mode。
示例
- 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'
返回值
常见的返回值已在 此处 记录,以下是此模块特有的字段
| 键 | 描述 | 
|---|---|
| 主机上项目的路径。 返回:成功 示例:  | |
| 存储 copr 项目信息的 repo 文件的名称。 返回:成功 示例:  | 
