On Jun 28, 2013 2:06 PM, "Tim Mooney" <[email protected]> wrote:
>
> works fine, but on hosts where we use our mysql module with the custom
> types and provider, we can't do that.  We instead have to
>
>         sudo su -
>         puppet agent --test

An alternative and trivia in addition to what Nan said:

You can use

    sudo -H

to set $HOME, or

    sudo -i

to get a full login environment like 'su -' gives. There are also sudoers
config params that can make at least the former default, and probably the
latter too.

And just for kicks, you can get a shell with:

    sudo -s

Additionally, you can explicitly pass the path of the `my.cnf`, rather than
relying on $HOME, which is what I'd do. Then you could make it a resource
parameter and gain some flexibility.

Sorry I'm a little short on details; I'm on my phone and don't have the man
pages handy.

Wil

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to