From a47619bea70757ac8f29dd92afc4552f52c72cee Mon Sep 17 00:00:00 2001 From: Conor Finn Date: Wed, 8 Feb 2023 15:35:41 +0000 Subject: [PATCH] Add privileges setters for new managed macs RE #62 --- .../ansible/roles/agent/tasks/main.yml | 8 ++++++++ 1 file changed, 8 insertions(+) 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. +