community.general.svr4pkg 模块 – 管理 Solaris SVR4 软件包
注意
此模块是 community.general 集合 (版本 10.1.0) 的一部分。
如果您使用的是 ansible 包,则可能已安装此集合。它不包含在 ansible-core 中。要检查它是否已安装,请运行 ansible-galaxy collection list。
要安装它,请使用: ansible-galaxy collection install community.general。
要在 playbook 中使用它,请指定: community.general.svr4pkg。
概要
- 管理 Solaris 10 和 11 上的 SVR4 软件包。 
- 这些是 Solaris <= 10 上的原生软件包,并且在 Solaris 11 中作为遗留功能可用。 
- 请注意,这是一个非常基本的打包系统。它不会在安装或删除时强制依赖关系。 
参数
| 参数 | 注释 | 
|---|---|
| 安装/删除类别而不是单个软件包。 选项 
 | |
| 软件包名称,例如  | |
| 如果  | |
| 指定如果软件包在安装时需要输入,则要使用的响应文件的位置。 | |
| 指定要从中安装软件包的位置。当  可以是  如果使用文件或目录,则主机必须已可以访问它们。有关如何将它们放在那里,请参见 ansible.builtin.copy 模块。 | |
| 是否安装 ( 如果要安装软件包,则需要  SVR4 软件包系统不提供升级操作。您需要卸载旧软件包,然后安装新软件包。 选项 
 | |
| 是否仅在当前区域安装软件包,还是将其安装到所有区域。 仅当您使用全局区域时,才能安装到所有区域。 选项 
 | 
属性
| 属性 | 支持 | 描述 | 
|---|---|---|
| 支持:完全支持 | 可以在  | |
| 支持:不支持 | 处于 diff 模式时,将返回有关已更改内容(或可能需要在  | 
示例
- name: Install a package from an already copied file
  community.general.svr4pkg:
    name: CSWcommon
    src: /tmp/cswpkgs.pkg
    state: present
- name: Install a package directly from an http site
  community.general.svr4pkg:
    name: CSWpkgutil
    src: 'http://get.opencsw.org/now'
    state: present
    zone: current
- name: Install a package with a response file
  community.general.svr4pkg:
    name: CSWggrep
    src: /tmp/third-party.pkg
    response_file: /tmp/ggrep.response
    state: present
- name: Ensure that a package is not installed
  community.general.svr4pkg:
    name: SUNWgnome-sound-recorder
    state: absent
- name: Ensure that a category is not installed
  community.general.svr4pkg:
    name: FIREFOX
    state: absent
    category: true
