Skip to content

Commit

Permalink
Revert "unixPb: Add role to install intel homebrew for arm64 macs (#3185
Browse files Browse the repository at this point in the history
)"

This reverts commit bc2a40a.
  • Loading branch information
Haroon-Khel authored Nov 16, 2023
1 parent ee23b70 commit cd96764
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 73 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -67,7 +67,7 @@

- name: Check if Homebrew is already installed
stat:
path: "{{ homebrew_path }}/brew"
path: "{{ homebrew_path }}"
register: brew

- name: Install Homebrew
Expand All @@ -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
Expand All @@ -91,7 +90,6 @@
become_user: "{{ ansible_user }}"
homebrew_tap:
name: buo/cask-upgrade
path: "{{ homebrew_path }}"
tags:
- brew_cu

Expand All @@ -100,34 +98,27 @@
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

- 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"))
Expand All @@ -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

Expand All @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -39,7 +29,6 @@
homebrew:
name: [email protected] # 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -124,7 +114,6 @@
homebrew:
name: curl
state: latest
path: "{{ homebrew_path }}"
when:
- ansible_distribution == "MacOSX"
- "macos_version_number is version('10.13', '>')"
Expand Down

0 comments on commit cd96764

Please sign in to comment.