community.general.svr4pkg (8.5.0) — module

Manage Solaris SVR4 packages

Authors: Boyd Adamson (@brontitall)

Install collection

Install with ansible-galaxy collection install community.general:==8.5.0


Add to requirements.yml

  collections:
    - name: community.general
      version: 8.5.0

Description

Manages SVR4 packages on Solaris 10 and 11.

These were the native packages on Solaris <= 10 and are available as a legacy feature in Solaris 11.

Note that this is a very basic packaging system. It will not enforce dependencies on install or remove.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Install a package from an already copied file
  community.general.svr4pkg:
    name: CSWcommon
    src: /tmp/cswpkgs.pkg
    state: present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Install a package directly from an http site
  community.general.svr4pkg:
    name: CSWpkgutil
    src: 'http://get.opencsw.org/now'
    state: present
    zone: current
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Ensure that a package is not installed
  community.general.svr4pkg:
    name: SUNWgnome-sound-recorder
    state: absent
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Ensure that a category is not installed
  community.general.svr4pkg:
    name: FIREFOX
    state: absent
    category: true

Inputs

    
src:
    description:
    - Specifies the location to install the package from. Required when O(state=present).
    - 'Can be any path acceptable to the C(pkgadd) command''s C(-d) option. For example:
      V(somefile.pkg), V(/dir/with/pkgs), V(http:/server/mypkgs.pkg).'
    - If using a file or directory, they must already be accessible by the host. See the
      M(ansible.builtin.copy) module for a way to get them there.
    type: str

name:
    description:
    - Package name, for example V(SUNWcsr).
    required: true
    type: str

zone:
    choices:
    - current
    - all
    default: all
    description:
    - Whether to install the package only in the current zone, or install it into all
      zones.
    - The installation into all zones works only if you are working with the global zone.
    required: false
    type: str

proxy:
    description:
    - HTTP[s] proxy to be used if O(src) is a URL.
    type: str

state:
    choices:
    - present
    - absent
    description:
    - Whether to install (V(present)), or remove (V(absent)) a package.
    - If the package is to be installed, then O(src) is required.
    - The SVR4 package system doesn't provide an upgrade operation. You need to uninstall
      the old, then install the new package.
    required: true
    type: str

category:
    default: false
    description:
    - Install/Remove category instead of a single package.
    required: false
    type: bool

response_file:
    description:
    - Specifies the location of a response file to be used if package expects input on
      install.
    required: false
    type: str