I need to use a template from profile module instead of from a component
module and not sure how.

This is what I have tried so far

# cat /etc/puppet/modules/profile/manifests/sssd.pp
class profile::sssd (
  $ldap_default_bind_dn = hiera('ldap_default_bind_dn'),
  $ldap_base = hiera('ldap_base'),
  $ldap_uri  = hiera('ldap_uri'),
  $ldap_access_filter = hiera('ldap_access_filter'),
  $ldap_tls_cacert = hiera('ldap_tls_cacert'),
) {
   include ::sssd

   file { '/etc/sssd/sssd.conf':
    ensure  => 'file',
    owner   => 'root',
    group   => 'root',
    mode    => '0600',
    content => template('profile/sssd.conf.erb'),
  }
}

# cat sssd.pp
include profile::sssd

# puppet apply sssd.pp
Error: Duplicate declaration: File[/etc/sssd/sssd.conf] is already declared
in file /etc/puppet/modules/sssd/manifests/config.pp:26; cannot redeclare
at /etc/puppet/modules/profile/manifests/sssd.pp:16 on node localhost
Error: Duplicate declaration: File[/etc/sssd/sssd.conf] is already declared
in file /etc/puppet/modules/sssd/manifests/config.pp:26; cannot redeclare
at /etc/puppet/modules/profile/manifests/sssd.pp:16 on node localhost

I need to setup the config file sssd.conf based on profile's template file
since some of the parameters I introduced are missing from the component
module

My component module is  evenup-sssd

Need help for a recommended way to fix this

Thanks

-- 
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

-- 
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/CAOHBbgWWyndHej7L%3D2Sr9M0CzfYUpAvUFeXLCHhQJzfUsbtrLg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to