Skip to content

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

Description

@bombsimon

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'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions