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
