On 24/01/14 14:39, Andreas Dvorak wrote:
Hi,

I am trying this. config.pp of module logrotate
define logrotate::config{
  case $::osfamily {
    redhat:{
      file { "/etc/logrotate.d/${conf_file}":
        ensure => 'present',
        owner  => 'root',
        group  => 'root',
        mode   => '0644',
source => "puppet://${puppetmaster}/modules/logrotate/${conf_file}",
      }
    }
    solaris:{
      notice('logrotate not available')
    }
    default:{
      fail("Unsupported platform: ${::osfamily}")
    }
  }
}

in the nodes.pp
  logrotate::config{'test':}
  logrotate::config{'puppet':}

And it says
Duplicate declaration: File[/etc/logrotate.d/] is already declared in file /data/git/test/modules/logrotate/manifests/config.pp:10 It also does not work if I just have on file to provide. The it does nothing.

Can you please help me?
Andreas


You're trying to define File[/etc/logrotate.d/$conf_file], buf if $conf_file is missing or empty, Puppet will create File[/etc/logrotate.d/] instead. This might explain your error.

Best regards,
Henrique Rodrigues

--
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/52E27C62.9070105%40notonthehighstreet.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to