jedtony

Untitled

Jun 17th, 2025 (edited)
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1.  
  2. provisioner "shell" {
  3. remote_folder = local.temp_dir
  4. inline = [
  5. "set +e",
  6. "echo 'DEBUG: Checking sudo installation and user permissions' | tee /tmp/debug_sudo_check.log",
  7. "which sudo 2>&1 | tee -a /tmp/debug_sudo_check.log || echo 'sudo not found' | tee -a /tmp/debug_sudo_check.log",
  8. "id ubuntu 2>&1 | tee -a /tmp/debug_sudo_check.log || echo 'ubuntu user not found' | tee -a /tmp/debug_sudo_check.log",
  9. "getent group sudo 2>&1 | tee -a /tmp/debug_sudo_check.log || echo 'sudo group not found' | tee -a /tmp/debug_sudo_check.log",
  10. "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",
  11. "echo '==== DEBUG LOG OUTPUT ===='",
  12. "cat /tmp/debug_sudo_check.log"
  13. ]
  14. }
Advertisement
Add Comment
Please, Sign In to add comment