community.general.portinstall (8.5.0) — module

Installing packages from FreeBSD's ports system

Authors: berenddeboer (@berenddeboer)

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

Manage packages for FreeBSD using 'portinstall'.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Install package foo
  community.general.portinstall:
    name: foo
    state: present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Install package security/cyrus-sasl2-saslauthd
  community.general.portinstall:
    name: security/cyrus-sasl2-saslauthd
    state: present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Remove packages foo and bar
  community.general.portinstall:
    name: foo,bar
    state: absent

Inputs

    
name:
    aliases:
    - pkg
    description:
    - name of package to install/remove
    required: true
    type: str

state:
    choices:
    - present
    - absent
    default: present
    description:
    - state of the package
    required: false
    type: str

use_packages:
    default: true
    description:
    - use packages instead of ports whenever available
    required: false
    type: bool