Hi,
here is what I'm trying to do:

I want to be able to exclude certain hostnames/ from a module by passing 
their hostnames in a parameter (array) within this module.

Example:

class centos-default {

  class { 'module':
    exclude => [ 'host1', 'host2' ],
  }

  class { 'module2':
    exclude => [ 'host3', 'host4' ],
  }

}

Now I assumed that the module code would have to look something like this:

class module(

  $exclude = '',

)
{

  if $::hostname != $exclude {
    include module::config
    include module::install
    ....
  }

}

But I can't seem to find the correct syntax for my "if" statement.


 

-- 
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/6928abf7-b83b-4173-854b-e7f7efccbde7%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to