Need to allow for no password sudo for the runners
When trying to run sudo
on the runner, getting:
Running after script...
$ sudo chown -R gitlab-runner .
sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
Think we need to add this little golden nugget from Caleb Cooper:
declare RUNNER_SUDO='/etc/sudoers.d/gitlab-runner'
func_setup_sudo() {
if [[ ! -f "${RUNNER_SUDO}" ]]; then
echo 'gitlab-runner ALL=(ALL:ALL) NOPASSWD:ALL' >> "${RUNNER_SUDO}"
fi
}
Edited by McDonnell, Marshall