Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unixPB: removes become for brew installs in macos - > common task #3757

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mahdipub
Copy link

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]

Checklist
  • commit message has one of the standard prefixes
  • faq.md updated if appropriate
  • other documentation is changed or added (if applicable)
  • playbook changes run through VPC or QPC (if you have access)
  • VPC/QPC not applicable for this PR
  • for inventory.yml changes, bastillion/nagios/jenkins updated accordingly

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]
@karianna
Copy link
Contributor

karianna commented Oct 1, 2024

The Mac OS X GH Action failed with:

TASK [Common : Add AdoptOpenJDK Java Repo] *************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "added: 0, unchanged: 0, error: failed to tap: AdoptOpenJDK/openjdk due to Error: Running Homebrew as root is extremely dangerous and no longer supported.\nAs Homebrew does not drop privileges on installation you would be giving all\nbuild scripts full access to your system.\n"}

@mahdipub
Copy link
Author

mahdipub commented Oct 1, 2024

The Mac OS X GH Action failed with:

TASK [Common : Add AdoptOpenJDK Java Repo] ************************************* fatal: [localhost]: FAILED! => {"changed": false, "msg": "added: 0, unchanged: 0, error: failed to tap: AdoptOpenJDK/openjdk due to Error: Running Homebrew as root is extremely dangerous and no longer supported.\nAs Homebrew does not drop privileges on installation you would be giving all\nbuild scripts full access to your system.\n"}

I am not sure how did you set up your environment but I think it is because you are running ansible with root/privileged user. In your case you need become to switch to less privileged user. But most of the time, the user we run on mac is not root and either is not privileged and need sudo to do something.

@karianna
Copy link
Contributor

karianna commented Oct 2, 2024

The Mac OS X GH Action failed with:
TASK [Common : Add AdoptOpenJDK Java Repo] ************************************* fatal: [localhost]: FAILED! => {"changed": false, "msg": "added: 0, unchanged: 0, error: failed to tap: AdoptOpenJDK/openjdk due to Error: Running Homebrew as root is extremely dangerous and no longer supported.\nAs Homebrew does not drop privileges on installation you would be giving all\nbuild scripts full access to your system.\n"}

I am not sure how did you set up your environment but I think it is because you are running ansible with root/privileged user. In your case you need become to switch to less privileged user. But most of the time, the user we run on mac is not root and either is not privileged and need sudo to do something.

That's a separate fix that may need to be applied to how we set up the GH action in that case. Is that something you can fix as part of this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants