diff --git a/jenkins-node/mantid-builder-macos/ansible/roles/agent/tasks/main.yml b/jenkins-node/mantid-builder-macos/ansible/roles/agent/tasks/main.yml index c646360..5b85687 100644 --- a/jenkins-node/mantid-builder-macos/ansible/roles/agent/tasks/main.yml +++ b/jenkins-node/mantid-builder-macos/ansible/roles/agent/tasks/main.yml @@ -2,6 +2,10 @@ # Deploy Jenkins agent on macOS # Install Requirements + +- name: Add user to sudoers on new macs + shell: /Applications/Privileges.app/Contents/Resources/PrivilegesCLI --add + ignore_errors: true # Not all the macs have these, so don't panic if it fails. - name: Install homebrew include_role: @@ -44,4 +48,8 @@ minute: "*/5" job: "$HOME/jenkins-slave.sh {{ agent_name }} {{ agent_secret }}" +- name: Remove user from sudoers on new macs + shell: /Applications/Privileges.app/Contents/Resources/PrivilegesCLI --remove + ignore_errors: true # Not all the macs have these, so don't panic if it fails. +