ansible.builtin.macports (v2.9.27) — module

Package manager for MacPorts

| "added in version" 1.1 of ansible.builtin"

Authors: Jimmy Tang (@jcftang)

preview | supported by community

Install Ansible via pip

Install with pip install ansible==2.9.27

Description

Manages MacPorts packages (ports)

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Install the foo port
  macports:
    name: foo
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Install the universal, x11 variant of the foo port
  macports:
    name: foo
    variant: +universal+x11
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Install a list of ports
  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
  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
  macports:
    name: foo
    selfupdate: yes
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Remove the foo port
  macports:
    name: foo
    state: absent
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Activate the foo port
  macports:
    name: foo
    state: active
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Deactivate the foo port
  macports:
    name: foo
    state: inactive

Inputs

    
name:
    aliases:
    - port
    description:
    - A list of port names.

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

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
    version_added: '2.8'
    version_added_collection: ansible.builtin

variant:
    aliases:
    - variants
    description:
    - A port variant specification.
    - 'C(variant) is only supported with state: I(installed)/I(present).'
    version_added: '2.7'
    version_added_collection: ansible.builtin

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