Make ansible ask for sudo password

If the user used to install and run bifrost can't run sudo
passwordless, the bifrost-cli appends the --ask-become-pass option
that makes ansible ask for the BECOME password, used to run
commands with become set to true.

Change-Id: I7148243b19baa8bfdd652827a9280d469622e3f3
This commit is contained in:
Riccardo Pittau 2020-07-21 14:49:49 +02:00
parent e03d187209
commit 639d9a58b3
1 changed files with 1 additions and 2 deletions

View File

@ -231,8 +231,7 @@ def check_for_root():
'[ $(whoami) == root ] || sudo --non-interactive true',
shell=True, stderr=subprocess.DEVNULL)
except subprocess.CalledProcessError:
# TODO(dtantsur): tell ansible to ask for password
sys.exit('Sudo without password is required for Bifrost')
COMMON_PARAMS.append('--ask-become-pass')
def main():