Ask Your Question

Refactoring modules for additional OS support?

asked 2013-03-29 07:51:45 -0600

josh gravatar image

Up until now our modules have only supported Linux (specifically the RedHat family). With the most v2.8 of PE supporting AIX, we want to start using Puppet to manage parts of our AIX infrastructure.

Since there aren't very many common pieces of configuration between AIX and Linux, I'm wondering what the best way to reorganize my modules would be. We currently have three environments - prod, qa, dev.

For our "base" modules, should I just rewrite them and wrap their logic in "case" statements to handle the different operating systems?

How have others handled adding multiple operating system ... (more)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-03-30 18:29:06 -0600

nvpuppet gravatar image

updated 2013-03-30 18:33:12 -0600

Please not that the following code has been neither tested nor run through 'parser validate'!

Here's some very simple example code for managing an NTP server that shows a common "params" pattern. You'll see this pattern all over the Forge:

class ntp(
   $ntp_servers = ''
) {
  include ntp::params 

  package { $ntp::params::package: ensure => present, }

  file { $ntp::params::config:
    ensure => file,
    owner => 'root',
    group => 'root',
    mode => '0644',
    content => template('ntp/ntp.conf.erb'),
    require => Package[$ntp::params::package],

  service { $ntp::params::service: 
    ensure => running, 
    enable => true,
    subscribe => File[$ntp:params::config],

The ntp::params class is used to ... (more)

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools


Asked: 2013-03-29 07:51:45 -0600

Seen: 210 times

Last updated: Mar 30 '13