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..5ee080d541 100644 --- a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/MacOSX.yml +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/MacOSX.yml @@ -25,12 +25,12 @@ - name: Set homebrew path (x64) set_fact: - homebrew_path: /usr/local/bin + homebrew_path: /usr/local/bin/brew when: ansible_architecture == "x86_64" - name: Set homebrew path (Arm64) set_fact: - homebrew_path: /opt/homebrew/bin + homebrew_path: /opt/homebrew/bin/brew when: ansible_architecture == "arm64" - name: Configure system-wide Bash profile @@ -67,7 +67,7 @@ - name: Check if Homebrew is already installed stat: - path: "{{ homebrew_path }}/brew" + path: "{{ homebrew_path }}" register: brew - name: Install Homebrew @@ -81,7 +81,6 @@ become_user: "{{ ansible_user }}" homebrew: upgrade_all: yes - path: "{{ homebrew_path }}" when: "macos_version_number is version('10.15', '>')" tags: - brew_upgrade @@ -91,7 +90,6 @@ become_user: "{{ ansible_user }}" homebrew_tap: name: buo/cask-upgrade - path: "{{ homebrew_path }}" tags: - brew_cu @@ -100,13 +98,12 @@ become_user: "{{ ansible_user }}" homebrew_tap: name: AdoptOpenJDK/openjdk - path: "{{ homebrew_path }}" # Skipping linting as no situation where this can't run (lint error 301) - name: Update Casks become: yes become_user: "{{ ansible_user }}" - command: "{{ homebrew_path }}/brew cu -y" + command: "{{ homebrew_path }} cu -y" tags: - brew_cu - skip_ansible_lint @@ -114,20 +111,14 @@ - name: Install Build Tool Packages become: yes become_user: "{{ ansible_user }}" - homebrew: - name: "{{ item }}" - state: present - path: "{{ homebrew_path }}" + homebrew: "name={{ item }} state=present" with_items: "{{ Build_Tool_Packages }}" tags: build_tools - name: Install Build Tool Packages NOT macOS 10.12 become: yes become_user: "{{ ansible_user }}" - homebrew: - name: "{{ item }}" - state: present - path: "{{ homebrew_path }}" + homebrew: "name={{ item }} state=present" with_items: "{{ Build_Tool_Packages_NOT_10_12 }}" when: - not (macos_version_number | regex_search("10.12")) @@ -136,30 +127,21 @@ - name: Install Build Tool Casks become: yes become_user: "{{ ansible_user }}" - homebrew_cask: - name: "{{ item }}" - state: present - path: "{{ homebrew_path }}" + homebrew_cask: "name={{ item }} state=present" with_items: "{{ Build_Tool_Casks }}" tags: build_tools - name: Install Test Tool Packages become: yes become_user: "{{ ansible_user }}" - homebrew: - name: "{{ item }}" - state: present - path: "{{ homebrew_path }}" + homebrew: "name={{ item }} state=present" with_items: "{{ Test_Tool_Packages }}" tags: test_tools - name: Install JCK Tool Casks become: yes become_user: "{{ ansible_user }}" - homebrew_cask: - name: "{{ item }}" - state: present - path: "{{ homebrew_path }}" + homebrew_cask: "name={{ item }} state=present" with_items: "{{ JCK_Tool_Casks }}" tags: jck_tools @@ -180,15 +162,6 @@ when: not pdfwriter.stat.exists tags: jck_tools -- name: Uninstall libpng - become: yes - become_user: "{{ ansible_user }}" - homebrew: - name: libpng - state: absent - path: "{{ homebrew_path }}" - tags: adoptopenjdk - # As per https://github.com/eclipse/openj9/issues/3790 - name: Creating /etc/sysctl.conf for kernel tunings file: diff --git a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Nagios_Plugins/tasks/nagios_MacOSX.yml b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Nagios_Plugins/tasks/nagios_MacOSX.yml index b6553498be..18da3d34b1 100644 --- a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Nagios_Plugins/tasks/nagios_MacOSX.yml +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Nagios_Plugins/tasks/nagios_MacOSX.yml @@ -6,22 +6,8 @@ ######################################## # Install Nagios dependencies packages # ######################################## - -- name: Set Mac homebrew path (x64) - set_fact: - homebrew_path: /usr/local/bin - when: ansible_architecture == "x86_64" - -- name: Set Mac homebrew path (Arm64) - set_fact: - homebrew_path: /opt/homebrew/bin - when: ansible_architecture == "arm64" - - name: Install additional packages used by Nagios - homebrew: - name: "{{ item }}" - state: present - path: "{{ homebrew_path }}" + homebrew: "name={{ item }} state=present" become: yes become_user: "{{ ansible_user }}" with_items: diff --git a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Xcode/tasks/main.yml b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Xcode/tasks/main.yml index 5f390c0983..6bae45d566 100644 --- a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Xcode/tasks/main.yml +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Xcode/tasks/main.yml @@ -20,16 +20,6 @@ Ensure that Apple_ID_User, Apple_ID_Password and FASTLANE_SESSION are defined. Skipping Xcode installation" when: apple_variables is not defined -- name: Set Mac homebrew path (x64) - set_fact: - homebrew_path: /usr/local/bin - when: ansible_architecture == "x86_64" - -- name: Set Mac homebrew path (Arm64) - set_fact: - homebrew_path: /opt/homebrew/bin - when: ansible_architecture == "arm64" - - name: Install Xcode when: apple_variables is defined block: @@ -39,7 +29,6 @@ homebrew: name: ruby@2.7 # no 3.0 yet for fastlane (https://github.com/fastlane/fastlane/issues/17931) state: present - path: "{{ homebrew_path }}" - name: Configure Bash profile extension for Ruby become: yes diff --git a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/curl/tasks/main.yml b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/curl/tasks/main.yml index 0f82f6e611..5691b9450d 100644 --- a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/curl/tasks/main.yml +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/curl/tasks/main.yml @@ -27,16 +27,6 @@ curl_latest: 7.79.1 tags: curl -- name: Set Mac homebrew path (x64) - set_fact: - homebrew_path: /usr/local/bin - when: ansible_distribution == "MacOSX" and ansible_architecture == "x86_64" - -- name: Set Mac homebrew path (Arm64) - set_fact: - homebrew_path: /opt/homebrew/bin - when: ansible_distribution == "MacOSX" and ansible_architecture == "arm64" - - name: Download curl {{ curl_latest }} get_url: url: https://github.com/curl/curl/releases/download/curl-7_79_1/curl-{{ curl_latest }}.tar.gz @@ -124,7 +114,6 @@ homebrew: name: curl state: latest - path: "{{ homebrew_path }}" when: - ansible_distribution == "MacOSX" - "macos_version_number is version('10.13', '>')"