Skip to content

Commit

Permalink
Merge pull request #32 from ccdc-opensource/florianpiesche-patch-1
Browse files Browse the repository at this point in the history
Get root for xcode setup where required (NO_JIRA)
  • Loading branch information
florianpiesche authored Jun 12, 2024
2 parents 2615aa2 + da23cff commit 59b06e3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tasks/Darwin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
- name: Check for existing Xcode v{{ xcode_version }} # noqa: no-changed-when
ansible.builtin.command:
cmd: xcodes installed {{ xcode_version }}
ignore_errors: "{{ ansible_check_mode }}"
ignore_errors: true
register: xcode_check
environment:
PATH: "/opt/homebrew/bin:/usr/local/bin:{{ ansible_env.PATH }}"
Expand Down Expand Up @@ -52,17 +52,19 @@
cmd: xcodes install {{ xcode_version }} --path /tmp/xcode-{{ xcode_version }}.xip --experimental-unxip
environment:
PATH: "/opt/homebrew/bin:/usr/local/bin:{{ ansible_env.PATH }}"
become: true

- name: Set active Xcode to v{{ xcode_version }} # noqa: no-changed-when
ansible.builtin.command:
cmd: xcodes select {{ xcode_version }}
environment:
PATH: "/opt/homebrew/bin:/usr/local/bin:{{ ansible_env.PATH }}"
become: true

- name: Accept Xcode licence # noqa: no-changed-when
ansible.builtin.command:
cmd: xcodebuild -license accept
check_mode: true
become: true

- name: Get list of installed packages # noqa: no-changed-when
ansible.builtin.command:
Expand Down

0 comments on commit 59b06e3

Please sign in to comment.