diff --git a/README.md b/README.md index 1815d4e..937611d 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,11 @@ Fallback to the built-in Mac App Store dialog to complete sign in. If set to yes A list of apps to ensure are installed on the computer. You can get IDs for all your existing installed apps with `mas list`, and you can search for IDs with `mas search [App Name]`. The `name` attribute is not authoritative and only used to provide better information in the playbook output. + mas_installation_async: 3600 + mas_installation_poll: 10 + +For long running app installations the play may be interrupted due to ssh connection timeout. To avoid this, set async/poll to positive values to block the next task(s) until app installation has finished. + mas_upgrade_all_apps: false Whether to run `mas upgrade`, which will upgrade all installed Mac App Store apps. diff --git a/tasks/main.yml b/tasks/main.yml index e1d9d63..5830302 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -36,6 +36,8 @@ command: mas install "{{ item.id|default(item) }}" with_items: "{{ mas_installed_apps + mas_installed_app_ids }}" when: (item.id | default(item) | string) not in mas_list.stdout + async: "{{ mas_installation_async | int }}" + poll: "{{ mas_installation_poll | int }}" - name: Upgrade all apps (if configured). command: mas upgrade