Bug #8472
install command should pre-pend sudo when login is not root
| Status: | Merged - Pending Release | Start date: | 07/18/2011 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | - | % Done: | 0% |
|
| Category: | - | Spent time: | - | |
| Target version: | - | |||
| Keywords: | Branch: | |||
| Votes: | 0 |
Description
The install command should pre-pend sudo when the login option is not root.
otherwise, script execution will fail with exit code 100
info: Executing remote command ... debug: Command: bash -c 'chmod u+x /tmp/f0cf1640-f4b9-c347-333d-ed4238166517/master_source.sh; /tmp/f0cf1640-f4b9-c347-333d-ed4238166517/master_source.sh' debug: SSH Command Exit Code: 100 info: Executing remote command ... Done
History
Updated by Alexandre Fouche 7 months ago
Amazon AMIs require login as ec2-user.
The problem is that if you run puppet node bootstrap —login ec2-user, it will detect it and run the install script as with sudo, which is fine, but sudo will not run it because it is configured by default to disallow sudo commands without a tty ( requiretty in /etc/sudoers ). And you can not change the sudoers within the script, since it can not be executed !