Created
March 14, 2012 10:23
-
-
Save yawn/2035598 to your computer and use it in GitHub Desktop.
Enable sudo upstart for a deployment $user
This file contains hidden or 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
augeas { "Allow upstart operations w/o password": | |
context => "/files/etc/sudoers", | |
changes => [ | |
"set Cmnd_Alias[alias/name = \"UPSTART\"]/alias/name UPSTART", | |
"set Cmnd_Alias[alias/name = \"UPSTART\"]/alias/command[1] /sbin/start", | |
"set Cmnd_Alias[alias/name = \"UPSTART\"]/alias/command[2] /sbin/stop", | |
"set Cmnd_Alias[alias/name = \"UPSTART\"]/alias/command[3] /sbin/restart", | |
"set Cmnd_Alias[alias/name = \"UPSTART\"]/alias/command[4] /sbin/initctl", | |
"set spec[user = \"${user}\"]/user ${user}", | |
"set spec[user = \"${user}\"]/host_group/host ALL", | |
"set spec[user = \"${user}\"]/host_group/command UPSTART", | |
"set spec[user = \"${user}\"]/host_group/command/runas_user root", | |
"set spec[user = \"${user}\"]/host_group/command/tag NOPASSWD", | |
], | |
require => Package["augeas"], | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment