Note
This plugin is part of the community.general collection (version 3.8.1).
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.mas
.
New in version 0.2.0: of community.general
mas-cli
.The below requirements are needed on the host that executes this module.
mas
in the bin pathmas account
).Parameter | Choices/Defaults | Comments |
---|---|---|
id list / elements=integer | The Mac App Store identifier of the app(s) you want to manage. This can be found by running mas search APP_NAME on your machine. | |
state string |
| Desired state of the app installation. The absent value requires root permissions, also see the examples. |
upgrade_all boolean |
| Upgrade all installed Mac App Store apps. aliases: upgrade |
Note
check_mode
.- name: Install Keynote community.general.mas: id: 409183694 state: present - name: Install Divvy with command mas installed in /usr/local/bin community.general.mas: id: 413857545 state: present environment: PATH: /usr/local/bin:{{ ansible_facts.env.PATH }} - name: Install a list of apps community.general.mas: id: - 409183694 # Keynote - 413857545 # Divvy state: present - name: Ensure the latest Keynote version is installed community.general.mas: id: 409183694 state: latest - name: Upgrade all installed Mac App Store apps community.general.mas: upgrade_all: yes - name: Install specific apps and also upgrade all others community.general.mas: id: - 409183694 # Keynote - 413857545 # Divvy state: present upgrade_all: yes - name: Uninstall Divvy community.general.mas: id: 413857545 state: absent become: yes # Uninstallation requires root permissions
© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/community/general/mas_module.html