community.general.installp 模块 – 管理 AIX 上的软件包

注意

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

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

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

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

概要

  • 在 AIX 上使用 “installp” 管理软件包

参数

参数

注释

accept_license

boolean

是否接受软件包的许可。

选择

  • false ← (默认)

  • true

name

别名: pkg

list / elements=string / required

要安装或删除的一个或多个软件包。

使用 all 安装在已通知的 repository_path 上可用的所有软件包。

repository_path

path

包含 AIX 软件包的路径(安装时必需)。

state

string

软件包是否需要在系统上存在或不存在。

选择

  • "absent"

  • "present" ← (默认)

属性

属性

支持

描述

check_mode

支持: 完整

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

diff_mode

支持:

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

注意

注意

  • 如果软件包已安装,即使软件包/文件集是新的,该模块也不会安装它。

示例

- name: Install package foo
  community.general.installp:
    name: foo
    repository_path: /repository/AIX71/installp/base
    accept_license: true
    state: present

- name: Install bos.sysmgt that includes bos.sysmgt.nim.master, bos.sysmgt.nim.spot
  community.general.installp:
    name: bos.sysmgt
    repository_path: /repository/AIX71/installp/base
    accept_license: true
    state: present

- name: Install bos.sysmgt.nim.master only
  community.general.installp:
    name: bos.sysmgt.nim.master
    repository_path: /repository/AIX71/installp/base
    accept_license: true
    state: present

- name: Install bos.sysmgt.nim.master and bos.sysmgt.nim.spot
  community.general.installp:
    name: bos.sysmgt.nim.master, bos.sysmgt.nim.spot
    repository_path: /repository/AIX71/installp/base
    accept_license: true
    state: present

- name: Remove packages bos.sysmgt.nim.master
  community.general.installp:
    name: bos.sysmgt.nim.master
    state: absent

作者

  • Kairo Araujo (@kairoaraujo)