Skip to content
This repository has been archived by the owner on May 31, 2021. It is now read-only.

use async/poll to avoid ssh conn timeout on long running installs #30

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 2 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down