community.general.macports (8.5.0) — module

Package manager for MacPorts

Authors: Jimmy Tang (@jcftang)

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 MacPorts packages (ports)

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Install the foo port
  community.general.macports:
    name: foo
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Install the universal, x11 variant of the foo port
  community.general.macports:
    name: foo
    variant: +universal+x11
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Install a list of ports
  community.general.macports:
    name: "{{ ports }}"
  vars:
    ports:
    - foo
    - foo-tools
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Update Macports and the ports tree, then upgrade all outdated ports
  community.general.macports:
    selfupdate: true
    upgrade: true
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Update Macports and the ports tree, then install the foo port
  community.general.macports:
    name: foo
    selfupdate: true
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Remove the foo port
  community.general.macports:
    name: foo
    state: absent
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Activate the foo port
  community.general.macports:
    name: foo
    state: active
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Deactivate the foo port
  community.general.macports:
    name: foo
    state: inactive

Inputs

    
name:
    aliases:
    - port
    description:
    - A list of port names.
    elements: str
    type: list

state:
    choices:
    - present
    - absent
    - active
    - inactive
    - installed
    - removed
    default: present
    description:
    - Indicates the desired state of the port.
    type: str

upgrade:
    default: false
    description:
    - Upgrade all outdated ports, either prior to installing ports or as a separate step.
    - Equivalent to running C(port upgrade outdated).
    type: bool

variant:
    aliases:
    - variants
    description:
    - A port variant specification.
    - O(variant) is only supported with O(state=installed) and O(state=present).
    type: str

selfupdate:
    aliases:
    - update_cache
    - update_ports
    default: false
    description:
    - Update Macports and the ports tree, either prior to installing ports or as a separate
      step.
    - Equivalent to running C(port selfupdate).
    type: bool