community / community.general / 2.5.9 / module / mas Manage Mac App Store applications with mas-cli | "added in version" 0.2.0 of community.general" Authors: Michael Heap (@mheap), Lukas Bestle (@lukasbestle)community.general.mas (2.5.9) — module
Install with ansible-galaxy collection install community.general:==2.5.9
collections: - name: community.general version: 2.5.9
Installs, uninstalls and updates macOS applications from the Mac App Store using the C(mas-cli).
- 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
id: description: - The Mac App Store identifier of the app(s) you want to manage. - This can be found by running C(mas search APP_NAME) on your machine. elements: int type: list state: choices: - absent - latest - present default: present description: - Desired state of the app installation. - The C(absent) value requires root permissions, also see the examples. type: str upgrade_all: aliases: - upgrade default: 'no' description: - Upgrade all installed Mac App Store apps. type: bool