node clasification with fact ?

20 views
Skip to first unread message

kaustubh chaudhari

unread,
Jun 19, 2014, 3:02:03 AM6/19/14
to puppet...@googlegroups.com
Hi All,


I have a existing infrastructure with win and linux systems, i am creating a new infrastructure with same version of win and linux systems.

In this i want to do.

all the server from new infrastructure should get specific set of classes automatically soon their certificate is accepted.

I was wondering to create custom fact say infra = newinfra

if this fact exist apply all the classes mentioned else do nothing.

This will make sure my existing setup is not affected by configuring site.pp and new infra will get the class required.

Is this possible, if yes, can some one refer or share an example regarding this ?

Thanks
-Kaustubh

Erik Dalén

unread,
Jun 19, 2014, 4:01:40 AM6/19/14
to puppet...@googlegroups.com
You an just put a if statement directly in the top scope of the site.pp that does this, like:

# site.pp
if $::infra == 'newinfra' {
  include newinfra_baseclass
}


--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/50103f6f-30c8-4404-9627-cb622d51c89e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Erik Dalén

kaustubh chaudhari

unread,
Jun 19, 2014, 4:04:06 AM6/19/14
to puppet...@googlegroups.com
Cool that's what i was thiking, just wanted to check if it can be done or not.


Thanks for your reply, i will try this now.

-Kaustubh
Reply all
Reply to author
Forward
0 new messages