[BUG]: sudo on Alpine doesn't work out-of-the-box #35
Notifications
Due Date
No due date set.
Blocks
#16 [BUG]: OMZ installation fails
max/vmn-ansible
Reference: max/vmn-ansible#35
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Description
Some scripts that requires sudo don't work on Alpine, because on this system sudo requires additional configuration. For example, root is not added to sudoers by default, while on the most of other systems it is.
🔁 Steps to Reproduce
✅ Expected Behavior
sudo is configured correctly on alpine and grants the privileges
❌ Actual Behavior
sudo is configured only for Cloud-Init users (ansible)
📄 Logs / Screenshots
[ERROR]: Task failed: Module failed: The command exited with a non-zero return code.
Origin: vmn-ansible/roles/human_admin_user/tasks/main.yaml:27:3
25
26 # WARNING: UNPRIVILEGED USER (not ansible) COMMANDS
27 - name: Install oh my zsh
^ column 3
fatal: [192.168.0.89]: FAILED! => {"changed": true, "changed_when_result": true, "cmd": ["/home/max/install_omz.sh"], "delta": "0:00:00.028867", "end": "2026-09-16 15:27:59.187104", "msg": "The command exited with a non-zero return code.", "rc": 1, "start": "2026-09-16 15:27:59.158237", "stderr": "root is not in the sudoers file.\nThis incident has been reported to the administrator.\nchmod: /home/max/install.sh: No such file or directory\nroot is not in the sudoers file.\nThis incident has been reported to the administrator.", "stderr_lines": ["root is not in the sudoers file.", "This incident has been reported to the administrator.", "chmod: /home/max/install.sh: No such file or directory", "root is not in the sudoers file.", "This incident has been reported to the administrator."], "stdout": "/home/root/.oh-my-zsh/oh-my-zsh.sh does not exist and we install ohmyzsh", "stdout_lines": ["/home/root/.oh-my-zsh/oh-my-zsh.sh does not exist and we install ohmyzsh"]}
📎 Additional Context
No response
✅ Submission Checklist