Skip to content

Commit

Permalink
Add checks for macOS version to account, signin tasks
Browse files Browse the repository at this point in the history
for those subcommands are no longer supported by `mas` on the recent versions of
macOS

- mas-cli/mas#164
- mas-cli/mas#417
- https://github.com/mas-cli/mas#%EF%B8%8F-known-issues
  • Loading branch information
antonalekseev committed Aug 19, 2022
1 parent 4c9b5a5 commit 7e83878
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions roles/mas/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@
failed_when: mas_account_result.rc > 1
check_mode: false
changed_when: false
when:
- ansible_distribution_version is version('12', '<')

- name: Sign in to MAS when email and password are provided.
command: 'mas signin "{{ mas_email }}" "{{ mas_password }}"'
register: mas_signin_result
when:
- ansible_distribution_version is version('10.13', '<')
- mas_account_result.rc == 1
- mas_email is truthy
- mas_password is truthy
Expand All @@ -22,6 +25,7 @@
command: 'mas signin "{{ mas_email }}" "{{ mas_password }}" --dialog'
register: mas_signin_result
when:
- ansible_distribution_version is version('10.13', '<')
- mas_signin_dialog
- mas_account_result.rc == 1
- mas_email is truthy
Expand Down

0 comments on commit 7e83878

Please sign in to comment.