From af2a367fbd44029ccd3224204869d5e0392357d8 Mon Sep 17 00:00:00 2001 From: Haroon Khel Date: Tue, 14 Nov 2023 13:53:24 +0000 Subject: [PATCH 1/2] switch back to default xcode --- .../AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/MacOSX.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/MacOSX.yml b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/MacOSX.yml index 033adc23a1..a0babe14b4 100644 --- a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/MacOSX.yml +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/MacOSX.yml @@ -10,6 +10,10 @@ msg: "The version of Ansible you are using needs to be greater than 2.11" when: ansible_version.full is version('2.11', '<=') +- name: Switch back to command line tools xcode before proceeding + command: sudo xcode-select --switch / + tags: adoptopenjdk + - name: Get macOS version shell: sw_vers -productVersion register: macos_version From ff5e81cce2f5467a8d1023e1aa6847ddee0b6c90 Mon Sep 17 00:00:00 2001 From: Haroon Khel Date: Tue, 28 Nov 2023 12:42:54 +0000 Subject: [PATCH 2/2] move xcode switch to after brew install --- .../roles/Common/tasks/MacOSX.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/MacOSX.yml b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/MacOSX.yml index a0babe14b4..567bafceb2 100644 --- a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/MacOSX.yml +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/MacOSX.yml @@ -10,10 +10,6 @@ msg: "The version of Ansible you are using needs to be greater than 2.11" when: ansible_version.full is version('2.11', '<=') -- name: Switch back to command line tools xcode before proceeding - command: sudo xcode-select --switch / - tags: adoptopenjdk - - name: Get macOS version shell: sw_vers -productVersion register: macos_version @@ -80,6 +76,10 @@ script: scripts/install-homebrew.sh when: not brew.stat.exists +- name: Switch back to command line tools xcode before proceeding + command: sudo xcode-select --switch / + tags: adoptopenjdk + - name: Upgrade installed packages become: yes become_user: "{{ ansible_user }}"