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 文件的名称。 返回: 成功 示例: |