sgnl05 / sgnl05-sssd

Puppet module for SSSD
https://forge.puppet.com/sgnl05/sssd
GNU General Public License v3.0
17 stars 76 forks source link

Using Hiera - HowTo #71

Closed rmueck closed 6 years ago

rmueck commented 6 years ago

Hello, I want to use the Hiera way with this module, so i created a hiera yaml for my needs. But i am unable to use the data. When i use include sssd only the default data from the module is used. It would be great if someone can help me! (I have to use the 1.x branch with Puppet 3.8.7)

edestecd commented 6 years ago

Can you paste in specific code examples of what you are using? Have you configured hiera properly? https://puppet.com/docs/puppet/5.2/hiera_config_yaml_5.html

What version or hiera and puppet are you using?

rmueck commented 6 years ago

Hello, we are using Puppet v3.8.7 and Hiera v1.3.1. A lookup on command line

hiera -d sssd::config role=Hadoop stage_os=dev domain=my.domain.com environment=dev

is working well. The corresponding hiera file delivers the correct config hash.

I expected to use this code (snippet)

class gss_sec_joinad (
  $package_name = $::gss_sec_joinad::params::package_name,
  $service_name = $::gss_sec_joinad::params::service_name,
) inherits ::gss_sec_joinad::params {

class {'::adcli':
  ad_domain        => 'MY.DOMAIN.COM',
  ad_join_username => 'JoinADUx',
  ad_join_password => 'VerYSec!',
  ad_join_ou       => 'DC=my,DC=domain,DC=com',
}

include sssd

But this only uses the default from params.pp:

class sssd::params {
  $ensure = 'present'
  $config = {
    'sssd' => {
      'config_file_version' => '2',
      'services'            => 'nss, pam',
      'domains'             => 'ad.example.com',
    },
    'domain/ad.example.com' => {
      'id_provider'       => 'ad',
      'krb5_realm'        => 'AD.EXAMPLE.COM',
      'cache_credentials' => true,
    },
  }

And i dont't know how to use hiera in this case. Any help is highly appreciated!

edestecd commented 6 years ago

where are you placing the hiera file you linked above?

rmueck commented 6 years ago

It is placed in /etc/puppet/environments/dev/hieradata/role/Hadoop/dev/my.domain.com/config.yaml Configuration in /etc/puppet/hiera.yaml is working...as mentioned in my initial post. Thank you!

ghoneycutt commented 6 years ago

Likely your hiera.yaml has a typo. Also if you modified it, you would need to restart the puppet master. Closing this since it is not an issue with the module. If you still need assistance, suggest using IRC, Slack or the puppet-users mailing list. Good luck and hope you get this fixed quick!

rmueck commented 6 years ago

Thank you ghoneycut for the hint! I simply forgot to restart the puppet master. It is working like a charm!