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:
parent
e03d187209
commit
639d9a58b3
@ -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():
|
||||
|
Loading…
x
Reference in New Issue
Block a user