- From: AJ Christensen <
>
- To:
- Subject: [chef] Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Chef and LDAP Users
- Date: Thu, 31 Jul 2014 12:22:02 +1200
If you 'include Chef::Mixin::ShellOut' in a custom library, you can
use #shell_out! there.
using the lazy attribute evaluator and the Mixin ShellOut classes'
shell_out!() functionality, something like this outta' work:
https://gist.github.com/fujin/f0b7dd38b558001c5913
--aj
On Thu, Jul 31, 2014 at 12:03 PM, Daniel DeLeo
<
>
wrote:
>
On Wednesday, July 30, 2014 at 5:00 PM, Douglas Garstang wrote:
>
> AJ,
>
>
>
> Thanks. One more question... shelling out in chef and grabbing the
>
> output... has never been an easy task... best approach?
>
>
>
> I was able to do this just now with the execute resource, I guess because
>
> that forks a new process too. It would be nice though to call getent in
>
> some fashion, and the parse the output, so that I could be sure that the
>
> group id I am assigning is the correct one for the user. At the moment
>
> it's coming out of a data bag.
>
>
>
> Also kinda gross.
>
>
>
> Doug
>
Well, it’ll be a little gross, but I think you’ll have to use a lazy
>
attribute
>
http://docs.getchef.com/resource_common.html#lazy-attribute-evaluation
>
>
In the code block you give to `lazy`, you can use backticks or %x to run a
>
command that returns the UID.
>
>
>
--
>
Daniel DeLeo
>
>
>
- [chef] Re: Re: Re: Chef and LDAP Users, (continued)
- [chef] Re: Re: Re: Chef and LDAP Users, AJ Christensen, 07/30/2014
- [chef] Re: Re: Re: Chef and LDAP Users, Douglas Garstang, 07/30/2014
- [chef] Re: Re: Re: Chef and LDAP Users, Douglas Garstang, 07/30/2014
- [chef] Re: Re: Re: Re: Chef and LDAP Users, Adam Jacob, 07/30/2014
- [chef] Re: Re: Re: Re: Re: Chef and LDAP Users, Douglas Garstang, 07/30/2014
- [chef] Re: Re: Re: Re: Re: Re: Chef and LDAP Users, AJ Christensen, 07/30/2014
- [chef] Re: Re: Re: Re: Re: Re: Re: Chef and LDAP Users, Douglas Garstang, 07/30/2014
- [chef] Re: Re: Re: Re: Re: Re: Re: Re: Chef and LDAP Users, AJ Christensen, 07/30/2014
- [chef] Re: Re: Re: Re: Re: Re: Re: Re: Re: Chef and LDAP Users, Douglas Garstang, 07/30/2014
- [chef] Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Chef and LDAP Users, Daniel DeLeo, 07/30/2014
- [chef] Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Chef and LDAP Users, AJ Christensen, 07/30/2014
- [chef] Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Chef and LDAP Users, AJ Christensen, 07/30/2014
- [chef] Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Chef and LDAP Users, Douglas Garstang, 07/31/2014
- [chef] Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Chef and LDAP Users, AJ Christensen, 07/31/2014
- [chef] Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Chef and LDAP Users, AJ Christensen, 07/31/2014
- [chef] Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Chef and LDAP Users, Douglas Garstang, 07/31/2014
- [chef] Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Chef and LDAP Users, AJ Christensen, 07/31/2014
- [chef] Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Chef and LDAP Users, AJ Christensen, 07/31/2014
- [chef] Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Chef and LDAP Users, Douglas Garstang, 07/31/2014
- [chef] Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Chef and LDAP Users, AJ Christensen, 07/31/2014
- [chef] Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Chef and LDAP Users, AJ Christensen, 07/31/2014
Archive powered by MHonArc 2.6.16.