On Monday, November 18, 2013 at 12:22 PM, Wes Parish wrote:
Hi Chef experts!
Quick question on LWRP execution. I am trying to create an LWRP that will allow me to execute ruby code as a user other than root (for example: To install an RPM as myself while running Chef as root).
Currently, my LWRP forks a process, changes the runtime user / group and executes eval() on the command string passed in. This seems to work perfectly for any native Chef resource, however, it does not execute LWRPs. It looks like it loads up the resource for the LWRP and is almost like chef-client passes over the resource as if the idempotence check thinks the resource is already converged.
On a side note, it would be a great feature addition if the ruby_block resource in Chef took a "user" attribute to execute a ruby block as a different user.
Any help would be greatly appreciated!
Thanks,
Wes
Archive powered by MHonArc 2.6.16.