Created
August 24, 2022 09:45
-
-
Save g3rhard/e76e16dda003ab2eec4feebc18533409 to your computer and use it in GitHub Desktop.
Privilege escalation wrapper for ansible from https://github.com/ansible/ansible/issues/12686#issuecomment-268535162
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# https://github.com/ansible/ansible/issues/12686#issuecomment-268535162 | |
cmd='' | |
for i in "$@"; do | |
i="${i//\\/\\\\}" | |
cmd="$cmd \"${i//\"/\\\"}\"" | |
done | |
sudo su - root << END | |
$cmd | |
END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment