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.