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

Playbook assumes the buildkite-agent user can change group to wheel #66

Open
bombsimon opened this issue Jan 26, 2021 · 0 comments
Open

Comments

@bombsimon
Copy link
Contributor

bombsimon commented Jan 26, 2021

Versions of relevant software used

develop branch or 4.1.0.

What happened

I couldn't run the playbook because it assumes the user running the playbook is a member of the group wheel.

What you expected to happen

The playbook to succeed.

How to reproduce it (as minimally and precisely as possible):

Run the playbook on a macOS machine without being a member of the wheel group.


In this commit, a change was made assuming that the buildkite-agent user on macOS has access to change group to wheel. This is not always the case.

Would it make sense to just use become here? If so, I can file a PR for that.

diff --git a/tasks/install-on-Darwin.yml b/tasks/install-on-Darwin.yml
index 6c8e489..493dfc1 100644
--- a/tasks/install-on-Darwin.yml
+++ b/tasks/install-on-Darwin.yml
@@ -24,6 +24,7 @@
     mode: '0400'
     owner: '{{ buildkite_agent_username }}'
     group: 'wheel'
+  become: true
   notify:
     - 'restart-darwin-buildkite'
 
@@ -34,6 +35,7 @@
     mode: '0444'
     owner: '{{ buildkite_agent_username }}'
     group: 'wheel'
+  become: true
   when: 'buildkite_agent_load_bash_profile'
   notify:
     - 'restart-darwin-buildkite'
@bombsimon bombsimon changed the title Playbook assumes the group wheel exist Playbook assumes the buildkite-agent user can change group to wheel Jan 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant