add sudo support to scriptfile
Reported by Charles Scott | January 10th, 2012 @ 10:43 AM
The following command employing a scriptfile will execute as the resource model's target user matching the tag criteria:
dispatch -L -p wsgc -I tags=pb+devint -s /local/path/to/rerun.bin -- stubbs: add-module -m foo --description bar
This command does this as a sudo user where sudo-command-enabled support has been added in resource model:
dispatch -L -p wsgc -I tags=pb+devint -- sudo -u tomcat /tmp/rerun.bin stubbs: add-module -m foo --description bar
It would be great to see a blending of the two (NOTE the following communicates the intent, option syntax not the key here):
dispatch -u tomcat -L -p wsgc -I tags=pb+devint -s /local/path/to/rerun.bin -- stubbs: add-module -m foo --description bar
where "-u tomcat" instructs the dispatcher to implicitly execute the scriptfile as a sudo to tomcat.
No comments found
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
(DEPRECATED) Please use github issues for issue tracking at http://github.com/dtolabs/rundeck/issues