Skip to content

Commit

Permalink
unixPB: removes become for brew installs in macos - > common task
Browse files Browse the repository at this point in the history
In macos when installing using brew and using a root/powered user, an error will show by brew: `Running Homebrew as root is extremely dangerous and no longer supported.`. In general we do not need `become` when installing with brew. This will remove become in common > macos brew installations.

Signed-off-by: [email protected]
  • Loading branch information
mahdipub committed Sep 30, 2024
1 parent d483066 commit 6b77d38
Showing 1 changed file with 0 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,13 @@
- brew_upgrade

- name: Install brew cu
become: yes
become_user: "{{ ansible_user }}"
homebrew_tap:
name: buo/cask-upgrade
path: "{{ homebrew_path }}"
tags:
- brew_cu

- name: Add AdoptOpenJDK Java Repo
become: yes
become_user: "{{ ansible_user }}"
homebrew_tap:
name: AdoptOpenJDK/openjdk
path: "{{ homebrew_path }}"
Expand All @@ -116,8 +112,6 @@
- skip_ansible_lint

- name: Install Build Tool Packages
become: yes
become_user: "{{ ansible_user }}"
homebrew:
name: "{{ item }}"
state: present
Expand All @@ -137,17 +131,13 @@
register: cmake_local

- name: Install Cmake
become: yes
become_user: "{{ ansible_user }}"
homebrew:
name: "cmake"
state: present
tags: build_tools
when: not (cmake_homebrew.stat.exists or cmake_local.stat.exists)

- name: Install Build Tool Packages NOT macOS 10.12
become: yes
become_user: "{{ ansible_user }}"
homebrew:
name: "{{ item }}"
state: present
Expand All @@ -158,8 +148,6 @@
tags: build_tools

- name: Install Build Tool Casks
become: yes
become_user: "{{ ansible_user }}"
homebrew_cask:
name: "{{ item }}"
state: present
Expand All @@ -168,8 +156,6 @@
tags: build_tools

- name: Install Test Tool Packages
become: yes
become_user: "{{ ansible_user }}"
homebrew:
name: "{{ item }}"
state: present
Expand All @@ -178,8 +164,6 @@
tags: test_tools

- name: Install JCK Tool Casks
become: yes
become_user: "{{ ansible_user }}"
homebrew_cask:
name: "{{ item }}"
state: present
Expand Down

0 comments on commit 6b77d38

Please sign in to comment.