On 3/19/14, 11:31 AM, Denny Schierz wrote:
> hi,
> 
> I try to reorganize my filesystemstructure for Puppet and have some
> problems. I assign all my classes to the nodes via LDAP, for example:
> rsyslog::server. The problem is now, that (for example) the saz-rsyslog
> module uses the defaults (example: save logs to /srv/log), instead of
> using my one:
> 
> /etc/puppet/modules/rsyslog/init.pp
> 
> class rsyslog include rsyslog::server, rsyslog::client {
>     purge_rsyslog_d => false,
> }
> 
> server.pp
> 
> class rsyslog::server inherits rsyslog {
>     'rsyslog::server': enable_tcp => true,
>     enable_udp => true,
>     enable_onefile => false,
>     server_dir => '/var/log/remote/',
>     }
> 
> client.pp
> 
> class rsyslog::client inherits rsyslog {
>     log_remote      => true,
>     remote_type     => 'udp',
>     log_local       => false,
>     log_auth_local  => false,
>     custom_config   => undef,
>     server          => 'logserver.example.com',
>     port            => '514',
>     preserve_fqdn   => true,
> }
> 
> db.pp
> 
> class rsyslog::database inherits rsyslog {
>     backend      => 'mysql',
>     server      => 'localhost',
>     database   => 'Syslog',
>     username  => 'rsyslog',
>     password => 'secret',
> }
> 
> The modules are imported via: /etc/puppet/manifests/site.pp
> 
> [...]
> import "rsyslog"
> [...]
> 
> What I have done wrong?
> 
> Any suggestions?
> 
> cu denny

Hi Denny,

Your site manifest should not have 'import "rsyslog"' as that does not
make any sense since it is not syntactically incorrect and you are
classifying nodes in LDAP.

In order to override a parameter's default value, add it to Hiera. So if
you want to change the value of the server_dir parameter to the
rsyslog::server class you would add the following in Hiera.

rsyslog::server::server_dir: /your/new/value

Check out
http://docs.puppetlabs.com/hiera/1/puppet.html#automatic-parameter-lookup for
me info.

Best regards,
-g

-- 
Garrett Honeycutt
@learnpuppet
Puppet Training with LearnPuppet.com
Mobile: +1.206.414.8658

-- 
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/5329D49E.8010803%40garretthoneycutt.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to