Ask Your Question
1

How to apply a tag-like configuration to Nodes.

asked 2013-10-16 05:10:20 -0500

asktbt gravatar image

Hi,

I find myself repeating the same configurations of network-settings over and over again. Though using a network module, there's still a lot of repeating involved. Since I'm still working my way through all the different puppet functions, I was silently hoping that puppet-tags might attribute in solving this issue.
In my imagination somewhere down the road with puppet I'm only applying a tag to a node (let's say "webserver") and puppet will deploy packages and configurations specified from e.g. hiera to that node.
While reading through the documentation, puppet tags seemed either a bit ... (more)

edit retag flag offensive close merge delete

Comments

1
ramindk gravatar imageramindk ( 2013-10-16 11:26:07 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
3

answered 2013-10-16 10:07:08 -0500

gertvdijk gravatar image

updated 2013-10-16 10:09:09 -0500

I think you're looking for a way to specify node roles and profiles. Together with ENCs or Hiera this can be very powerful.

See this blog article I found really useful: http://www.craigdunn.org/2012/05/239/

A for-itself-speaking excerpt:

class role::www::dev inherits role::www { 
  include profile::webserver::dev
  include profile::database
}

class role::www::live inherits role::www { 
  include profile::webserver::live
}

class profile::webserver { 
  # Configuration for all webservers
  class { "httpd": } 
  class { "php": } 
  class { "memcache": } 
}

class profile::webserver::dev inherits profile::webserver { 
  Class["php"] { 
    loglevel   => "debug"
  }
}

class profile::webserver::live inherits profile::webserver { 
  # Any live ...
(more)
edit flag offensive delete link more
0

answered 2013-10-17 00:54:07 -0500

asktbt gravatar image

Thank you both very much. That was exactly what I had in mind. Just completely explained and much further thought through than I had it done with my initial thoughts.
I thinks this will be the way to go for me here.

edit flag offensive delete link more

Comments

Please don't use a new Answer just to say "Thank you". Instead, use the comment section and vote/mark as correct (as you already did). That is how Q ...(more)

gertvdijk gravatar imagegertvdijk ( 2013-10-17 03:31:42 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2013-10-16 05:10:20 -0500

Seen: 621 times

Last updated: Oct 17 '13