ansible.builtin.macports (v2.7.7) — 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.7.7

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 the ports tree then install the foo port
  macports:
    name: foo
    update_ports: 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.
    required: true

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

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

update_ports:
    aliases:
    - update_cache
    default: 'no'
    description:
    - Update the ports tree first.
    type: bool