Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- provisioner "shell" {
- remote_folder = local.temp_dir
- inline = [
- "set +e",
- "echo 'DEBUG: Checking sudo installation and user permissions' | tee /tmp/debug_sudo_check.log",
- "which sudo 2>&1 | tee -a /tmp/debug_sudo_check.log || echo 'sudo not found' | tee -a /tmp/debug_sudo_check.log",
- "id ubuntu 2>&1 | tee -a /tmp/debug_sudo_check.log || echo 'ubuntu user not found' | tee -a /tmp/debug_sudo_check.log",
- "getent group sudo 2>&1 | tee -a /tmp/debug_sudo_check.log || echo 'sudo group not found' | tee -a /tmp/debug_sudo_check.log",
- "groups ubuntu 2>&1 | tee -a /tmp/debug_sudo_check.log || echo 'could not get groups for ubuntu' | tee -a /tmp/debug_sudo_check.log",
- "echo '==== DEBUG LOG OUTPUT ===='",
- "cat /tmp/debug_sudo_check.log"
- ]
- }
Advertisement
Add Comment
Please, Sign In to add comment