community.general.swdepot 模块 – 使用 swdepot 包管理器 (HP-UX) 管理软件包

注意

此模块是 community.general 集合(版本 10.1.0)的一部分。

如果您正在使用 ansible 包,您可能已经安装了此集合。 它不包含在 ansible-core 中。要检查是否已安装,请运行 ansible-galaxy collection list

要安装它,请使用: ansible-galaxy collection install community.general

要在 playbook 中使用它,请指定:community.general.swdepot

概要

  • 将使用 swdepot 包管理器 (HP-UX) 安装、升级和删除软件包

参数

参数

注释

depot

字符串

从中安装或升级软件包的源存储库。

name

别名: pkg

字符串 / 必需

软件包名称。

状态

字符串 / 必需

是否安装 (present, latest) 或删除 (absent) 软件包。

选择

  • "present"

  • "latest"

  • "absent"

属性

属性

支持

描述

check_mode

支持: 完全

可以在 check_mode 中运行,并返回更改状态预测,而不会修改目标。

diff_mode

支持:

当处于 diff 模式时,将返回有关已更改的内容(或可能需要在 check_mode 中更改的内容)的详细信息。

示例

- name: Install a package
  community.general.swdepot:
    name: unzip-6.0
    state: present
    depot: 'repository:/path'

- name: Install the latest version of a package
  community.general.swdepot:
    name: unzip
    state: latest
    depot: 'repository:/path'

- name: Remove a package
  community.general.swdepot:
    name: unzip
    state: absent

作者

  • Raul Melo (@melodous)