community.general.mas (0.1.4) — module

Manage Mac App Store applications with mas-cli

| "added in version" 0.2.0 of community.general"

Authors: Michael Heap (@mheap), Lukas Bestle (@lukasbestle)

Install collection

Install with ansible-galaxy collection install community.general:==0.1.4


Add to requirements.yml

  collections:
    - name: community.general
      version: 0.1.4

Description

Installs, uninstalls and updates macOS applications from the Mac App Store using the C(mas-cli).


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Install Keynote
  mas:
    id: 409183694
    state: present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Install a list of apps
  mas:
    id:
      - 409183694 # Keynote
      - 413857545 # Divvy
    state: present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Ensure the latest Keynote version is installed
  mas:
    id: 409183694
    state: latest
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Upgrade all installed Mac App Store apps
  mas:
    upgrade_all: yes
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Install specific apps and also upgrade all others
  mas:
    id:
      - 409183694 # Keynote
      - 413857545 # Divvy
    state: present
    upgrade_all: yes
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Uninstall Divvy
  mas:
    id: 413857545
    state: absent
  become: yes # Uninstallation requires root permissions

Inputs

    
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