W3cubDocs

/Ansible 2.11

community.general.macports – Package manager for MacPorts

Note

This plugin is part of the community.general collection (version 2.0.1).

To install it use: ansible-galaxy collection install community.general.

To use it in a playbook, specify: community.general.macports.

Synopsis

  • Manages MacPorts packages (ports)

Parameters

Parameter Choices/Defaults Comments
name
list / elements=string
A list of port names.

aliases: port
selfupdate
boolean
    Choices:
  • no
  • yes
Update Macports and the ports tree, either prior to installing ports or as a separate step.
Equivalent to running port selfupdate.

aliases: update_cache, update_ports
state
string
    Choices:
  • present
  • absent
  • active
  • inactive
  • installed
  • removed
Indicates the desired state of the port.
upgrade
boolean
    Choices:
  • no
  • yes
Upgrade all outdated ports, either prior to installing ports or as a separate step.
Equivalent to running port upgrade outdated.
variant
string
A port variant specification.
variant is only supported with state: installed/present.

aliases: variants

Examples

- name: Install the foo port
  community.general.macports:
    name: foo

- name: Install the universal, x11 variant of the foo port
  community.general.macports:
    name: foo
    variant: +universal+x11

- name: Install a list of ports
  community.general.macports:
    name: "{{ ports }}"
  vars:
    ports:
    - foo
    - foo-tools

- name: Update Macports and the ports tree, then upgrade all outdated ports
  community.general.macports:
    selfupdate: yes
    upgrade: yes

- name: Update Macports and the ports tree, then install the foo port
  community.general.macports:
    name: foo
    selfupdate: yes

- name: Remove the foo port
  community.general.macports:
    name: foo
    state: absent

- name: Activate the foo port
  community.general.macports:
    name: foo
    state: active

- name: Deactivate the foo port
  community.general.macports:
    name: foo
    state: inactive

Authors

  • Jimmy Tang (@jcftang)

© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.11/collections/community/general/macports_module.html