community.general.swupd 模块 – 管理 ClearLinux 系统中的更新和软件包
注意
此模块是 community.general 集合 (版本 10.1.0) 的一部分。
如果您使用的是 ansible 包,则可能已经安装了此集合。它不包含在 ansible-core 中。要检查是否已安装,请运行 ansible-galaxy collection list。
要安装它,请使用:ansible-galaxy collection install community.general。
要在 playbook 中使用它,请指定:community.general.swupd。
概要
- 使用 Clear Linux Project 用于 Intel 架构的 swupd 软件包管理器管理更新和软件包。 
参数
| 参数 | 注释 | 
|---|---|
| 指向可用软件包内容的 URL。如果未指定,则内容将从 clearlinux.org 获取。 | |
| 版本文件下载的格式后缀。例如 [1,2,3,staging,etc]。如果未指定,则使用默认格式。 | |
| 清单包含关于操作系统特定版本软件包的信息。指定清单版本以针对该版本进行验证,或不指定以针对当前版本进行验证。 | |
| 要安装或删除的 (I)bundle 的名称。 | |
| 指示所需的 (I)bundle 状态。 选项 
 | |
| 将操作系统更新到最新版本。 选项 
 | |
| 覆盖  | |
| 验证操作系统版本的內容。 选项 
 | |
| 版本字符串下载的 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 的标准错误输出 返回:始终返回 | |
| swupd 的标准输出 返回:始终返回 | 
