community.general.swupd 模块 – 管理 ClearLinux 系统中的更新和捆绑包
注意
此模块是 community.general 集合(版本 10.1.0)的一部分。
如果您正在使用 ansible 包,您可能已经安装了此集合。它不包含在 ansible-core 中。要检查是否已安装,请运行 ansible-galaxy collection list。
要安装它,请使用:ansible-galaxy collection install community.general。
要在剧本中使用它,请指定:community.general.swupd。
概要
- 使用 swupd 捆绑包管理器管理更新和捆绑包,该管理器由英特尔架构的 Clear Linux 项目使用。 
参数
| 参数 | 注释 | 
|---|---|
| 指向可用捆绑包内容的 URL。如果未指定,则从 clearlinux.org 检索内容。 | |
| 版本文件下载的格式后缀。例如 [1,2,3,staging,etc]。如果未指定,则使用默认格式。 | |
| 清单包含有关操作系统特定版本捆绑包的信息。指定清单版本以根据该版本进行验证,或者保留未指定以根据当前版本进行验证。 | |
| 要安装或删除的 (I) 捆绑包的名称。 | |
| 指示所需的 (I) 捆绑包状态。 选项 
 | |
| 将操作系统更新到最新版本。 选项 
 | |
| 覆盖  | |
| 验证操作系统版本的内容。 选项 
 | |
| 版本字符串下载的 URL。 | 
属性
| 属性 | 支持 | 描述 | 
|---|---|---|
| 支持: 完全 | 可以在  | |
| 支持: 无 | 在差异模式下运行时,将返回有关已更改(或可能需要在  | 
示例
- name: Update the OS to the latest version
  community.general.swupd:
    update: true
- name: Installs the "foo" bundle
  community.general.swupd:
    name: foo
    state: present
- name: Removes the "foo" bundle
  community.general.swupd:
    name: foo
    state: absent
- name: Check integrity of filesystem
  community.general.swupd:
    verify: true
- name: Downgrade OS to release 12920
  community.general.swupd:
    verify: true
    manifest: 12920
返回值
常见返回值记录在此处 此处,以下是此模块特有的字段
| 键 | 描述 | 
|---|---|
| swupd 的 stderr 返回: 始终 | |
| swupd 的 stdout 返回: 始终 | 
