From 4a3d0b544398b63bf34fd6cf797fe95a72adfe12 Mon Sep 17 00:00:00 2001 From: Brian Zalewski <59970525+ProfessorManhattan@users.noreply.github.com> Date: Mon, 6 Nov 2023 10:06:56 +0000 Subject: [PATCH] Made Ansible passwordless root not impact global passwordless root --- home/dot_local/bin/executable_install-program | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/home/dot_local/bin/executable_install-program b/home/dot_local/bin/executable_install-program index adc8ca2d..d914e2ea 100644 --- a/home/dot_local/bin/executable_install-program +++ b/home/dot_local/bin/executable_install-program @@ -581,9 +581,9 @@ async function afterInstall(packageManager) { log('info', logStage, `Ensuring temporary passwordless sudo privileges used by Ansible are removed`) const gsed = which.sync('gsed', { nothrow: true }) if (gsed) { - await $`sudo gsed -i '/# TEMPORARY FOR INSTALL DOCTOR/d' /etc/sudoers` + await $`sudo gsed -i '/# TEMPORARY FOR ANSIBLE INSTALL DOCTOR/d' /etc/sudoers` } else { - await $`sudo sed -i '/# TEMPORARY FOR INSTALL DOCTOR/d' /etc/sudoers` + await $`sudo sed -i '/# TEMPORARY FOR ANSIBLE INSTALL DOCTOR/d' /etc/sudoers` } } else if (packageManager === 'apk') { } else if (packageManager === 'apt') { @@ -733,7 +733,7 @@ async function beforeInstall(packageManager) { } } else if (packageManager === 'ansible') { log('info', logStage, `Temporarily enabling passwordless sudo for Ansible role installations`) - await $`echo "$(whoami) ALL=(ALL:ALL) NOPASSWD: ALL # TEMPORARY FOR INSTALL DOCTOR" | sudo tee -a /etc/sudoers` + await $`echo "$(whoami) ALL=(ALL:ALL) NOPASSWD: ALL # TEMPORARY FOR ANSIBLE INSTALL DOCTOR" | sudo tee -a /etc/sudoers` log('info', logStage, 'Running Ansible setup task so facts are cached') const unbuffer = which.sync('unbuffer', { nothrow: true }) let unbufferPrefix = ''