Great! Glad that I could help. Shameless plug: I maintain a toolbox of common Fabric operations (create users, install packages...), called fabtools ( http://fabtools.readthedocs.org/). Currently, it primarily supports Linux hosts, but there is already some SmartOS support. If you feel like giving it a try, I'd love your feedback on what works or not on Solaris, and any suggestions for improvement!
Regards, Ronan Amicel On Thu, Mar 7, 2013 at 3:35 PM, Justin Palmer <[email protected]>wrote: > This is exactly it. Specifying env.sudo_prefix allowed sudo to be found > in /usr/local/bin. > > Thanks for your help! > > > On Wed, Mar 6, 2013 at 2:21 PM, Ronan Amicel <[email protected]>wrote: > >> >> On Wed, Mar 6, 2013 at 7:58 PM, Justin Palmer <[email protected]>wrote: >> >>> Trying a simple test fabfile to run a sudo command on Solaris. Gives >>> the results below. The sudo path is set via .profile which I assume would >>> be read with shell=True. What am I missing? >> >> >> >> When you use run(cmd, shell=True), fabric will execute the command within >> a shell. >> >> When you use sudo(cmd, shell=True), fabric will use sudo to run this >> shell, but the sudo call itself will not happen within a shell context, so >> your .profile is not executed, and /usr/local/bin in not in the PATH. >> >> Try adding this at the beginning of your fabfile (after imports): >> >> env.sudo_prefix = "/usr/local/bin/sudo -S -p '%(sudo_prompt)s' " >> >> Hope this helps. >> >> -- >> Ronan Amicel >> > >
_______________________________________________ Fab-user mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/fab-user
