pre.install hangs in "verify sudo" step
miaeyg opened this issue · 4 comments
Describe the bug
Running the pre.install playbook it hangs when it reaches the step where it verifies sudo access. The step executes the "sudo -l" command and prompts the user to enter his password and then hangs as the prompt is not visible to the user running the playbook. This does not make sense as the playbook was invoked with the "--ask-become-pass" option and the user was prompted for the password already.
Environment
- Ansible version: 2.9
- Python version: 3.8
- OS version: RHEL 8
- Failed playbook tasks log (or entire playbook log) [Attach]
- What version of Viya 3.x is being deployed? 3.5
To Reproduce
Steps to reproduce the behavior:
- Firstly, ...
- Then, ...
Expected behavior
A clear and concise description of what you expected to happen.
Hello @miaeyg. Sorry for any delay in responding. Generally, if the remote_user has sudo on the controller the privilege escalation will work as expected. Why is "--ask-become-pass" necessary in your environment?
A workaround to bypass this task - and others related to "usersudoaccess" would be to execute with "--skip-tags usersudoaccess".
Hi @kevinlinglesas . The "--ask-become-pass" is required in this case as the user performing the installation has "sudo" permission but the "sudo" permission requires typing the password to allow the "sudo" command to work. The "--ask-become-pass" Ansible option addresses this specific case as it prompts for the password when invoking the ansible playbook.
I have personally never used that option and will need to go take some time to understand and attempt to reproduce.
Am I correct that your user's /etc/sudoers entry is "ALL=(ALL) ALL"?
Are you able to make progress with skip-tags?
Frankly, it's been quite a while since digging into these playbooks so I will need to also re-familiarize a bit.