community.general.macports (3.8.10) — module

Package manager for MacPorts

Authors: Jimmy Tang (@jcftang)

Install collection

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


Add to requirements.yml

  collections:
    - name: community.general
      version: 3.8.10

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: yes
    upgrade: yes
  • 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: yes
  • 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: 'no'
    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.
    - 'C(variant) is only supported with state: I(installed)/I(present).'
    type: str

selfupdate:
    aliases:
    - update_cache
    - update_ports
    default: 'no'
    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