On Thursday, April 17, 2014 1:55:20 PM UTC-5, Jose Luis Ledesma wrote:
>
> Remove the node word and you have it
>
> if $::system_role == "app-server" {
>
> ..
>
> ...
>
> include default;
>
> }
>

Do note, however, that is a top-level declaration, not a node definition.  
That's perfectly fine for most purposes, but there are a few corner cases 
where it could be an issue.

More generally, node definitions classify nodes based on their *identity*, 
in the form of their $clientcert.  Nothing else provided by the client 
factors in to associating client nodes with node definitions.  That's not 
really very limiting however, for even if you want or need node definitions 
(so that Jose's suggestion isn't applicable), you can put your conditional 
logic inside a general node declaration or into a class, or, even better, 
you can use hiera to assign data and classes to your nodes based on the 
values of their facts.


John

-- 
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 puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/f7a9ab93-c8eb-4da1-b5c9-de5ee1ee604b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to