Thanks Peter I'll give that a shot.

I'm still a noob to Puppet, but yeah I'm aware putting in node-specific 
logic in our manifests is not best practice. Still trying to figure out a 
way I could do what I'm trying to do.

Thanks again sir.

- Philippe

On Thursday, March 13, 2014 1:01:41 PM UTC-7, Peter Bukowinski wrote:
>
>
> On Mar 13, 2014, at 2:33 PM, Philippe Conway 
> <[email protected]<javascript:>> 
> wrote: 
>
> > Hey Guys, 
> > 
> > I am wanting to add certain users to certain hosts. I was thinking of 
> listing it in my users module. Here is an example: 
> > 
> >  user {'llane': 
> >     if $fqdn = 'node1.example.com' { 
> >       ensure => present, 
> >     }else{ 
> >       ensure => absent, 
> >     } 
> >     home       => '/home/llane', 
> >     managehome => true, 
> >     uid        => '1003', 
> >     shell      => '/bin/bash', 
> >     comment    => 'Lois Lane', 
> >   } 
> > 
> > Basically looking to add Lois Lane to ONLY node1.example.com. 
> > 
> > However Puppet is saying I can't do it because of a syntax error. To me 
> the code looks correct, but I may be just tired and not noticing the error. 
> Any suggestions? Thanks 
> > 
> > - Philippe 
>
> You may already be aware that putting node-specific logic in your puppet 
> manifests is not a best practice, but I'll help you with the syntax error. 
> Your if conditional needs to use '==' to test the fact value, not a single 
> equal which is used for assigning values. 
>
> -- 
> Peter Bukowinski

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/f9649e76-0c75-45eb-b15a-268d5dc0c915%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to