community.general.macports module – Package manager for MacPorts
Note
This module is part of the community.general collection (version 4.8.3).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.general
.
To use it in a playbook, specify: community.general.macports
.
Parameters
Parameter |
Comments |
---|---|
A list of port names. |
|
Update Macports and the ports tree, either prior to installing ports or as a separate step. Equivalent to running Choices:
|
|
Indicates the desired state of the port. Choices:
|
|
Upgrade all outdated ports, either prior to installing ports or as a separate step. Equivalent to running Choices:
|
|
A port variant specification.
|
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)
Collection links
Issue Tracker Repository (Sources) Submit a bug report Request a feature Communication