Looks like single quoting params is causing the problem. This passes validation

  class { 'cis::iptables::configure':
    level => $level,
    type  => $type,
    roles => $roles,
  }

Ramin

On 2/10/2020 12:38 PM, 'Prentice Bisbal' via Puppet Users wrote:
Is this legitimate puppet code? I'm trying to pass arguments instead of using global variables (ie, don't keep looking them up in hiera).  This syntax works elsewhere, but I've yet to use it within a class. When I run 'puppet parser validate', I get an error.

class cis::iptables (
   Integer $level,
   String $type,
   Array $roles ) {

   include cis::iptables::install
  class {'cis::iptables::configure': 'level' => $level, 'type' => $type, 'roles' => $roles}   #This line   class {'cis::iptables::service': 'level' => $level, 'type' => $type, 'roles' => $roles}       # and this line
}


--
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/ec44e4db-b231-6143-fbc0-fe19902c3405%40badapple.net.

Reply via email to