I've been using foreman as an ENC and assigning node parameters for some time 
and it was clearly working but it apparently broke somewhere along the way and 
I can't tell why.

Here's part of the modules/sudoers/manifests/sudoers_hostgroup.pp

class sudoers::hostgroup {
  case hostgroup {
    default: {
      file{"/etc/sudoers.d/admins_web":
        ensure  => present,
        owner   => root,
        group   => root,
        mode    => 0440,
        source  => "puppet:///modules/sudoers/admins_web",
      }
      # Puppet maintained file /etc/puppet/deployment_files/ldap_admins_web
      file{"/etc/puppet/deployment_files/ldap_admins_web":
        ensure  => present,
        owner   => root,
        group   => root,
        mode    => 0644,
        content => generate("/etc/puppet/scripts/ldap-add-host.sh", $fqdn, 
"admins_web"),
        require => Class["mod_puppet::deployment_files"],
      }
    }
    'database server': {
      file{"/etc/sudoers.d/admins_database":
        ensure  => present,
        owner   => root,
        group   => root,
        mode    => 0440,
        source  => "puppet:///modules/sudoers/admins_database",
      }
    # Puppet maintained file /etc/puppet/deployment_files/ldap_admins_database
      file{"/etc/puppet/deployment_files/ldap_admins_database":
        ensure  => present,
        owner   => root,
        group   => root,
        mode    => 0644,
        content => generate("/etc/puppet/scripts/ldap-add-host.sh", $fqdn, 
"admins_database"),
        require => Class["mod_puppet::deployment_files"],
      }
    }
  }
}

and FWIW, some of the nodes that I set up in October and earlier have the files 
(puppet/deployment_files/admins_web, /etc/sudoers.d/admins_web) but the new 
nodes clearly do not. I'm not sure if it was migrating from puppet 2.6.8 or 
foreman from 0.3 to 0.4 but I can clearly see the 'hostgroup' parameters are 
attached to the host's yaml file in /var/lib/puppet/yaml/foreman

and just in case, I have tried changing the 'hostgroup' top scope to $hostgroup 
and $::hostgroup to no avail.

What am I missing or how can I troubleshoot this?

-- 
Craig White ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [email protected]
1.800.869.6908 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ www.ttiassessments.com 

Need help communicating between generations at work to achieve your desired 
success? Let us help!

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to