| Parameter | Choices/Defaults | Comments |
|---|---|---|
| name required | A list of port names. aliases: port | |
| state |
| Indicates the desired state of the port. |
| update_ports bool |
| Update the ports tree first. aliases: update_cache |
| variant (added in 2.7) | A port variant specification. variant is only supported with state: installed/present.aliases: variants |
- name: Install the foo port
macports:
name: foo
- name: Install the universal, x11 variant of the foo port
macports:
name: foo
variant: +universal+x11
- name: Install a list of ports
macports:
name: "{{ ports }}"
vars:
ports:
- foo
- foo-tools
- name: Update the ports tree then install the foo port
macports:
name: foo
update_ports: yes
- name: Remove the foo port
macports:
name: foo
state: absent
- name: Activate the foo port
macports:
name: foo
state: active
- name: Deactivate the foo port
macports:
name: foo
state: inactive
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
This module is flagged as community which means that it is maintained by the Ansible Community. See Module Maintenance & Support for more info.
For a list of other modules that are also maintained by the Ansible Community, see here.
Hint
If you notice any issues in this documentation you can edit this document to improve it.
© 2012–2018 Michael DeHaan
© 2018 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.7/modules/macports_module.html