Dear all,

I'm getting this "Duplicate definition" error but can't make sure
what's going wrong. I have this definition: voms in the vomscert.pp:


# /etc/puppet/modules/d_services/manifests/vomscert.pp
----------------------------------------------------------------------------
class d_services::vomscert {

    define voms($dir, $lsc) {

        $voms_dir = '/etc/grid-security/vomsdir'
        exec { 'chk_vomsdir':
            path          => [ '/bin', '/usr/bin' ],
            command => "test -d ${voms_dir}/${dir}",
        }

        file { "${dir}":
            name    => "${voms_dir}/${dir}/${lsc}",
            mode    => '0644', owner => 'root', group => 'root',
            source  => "puppet:///modules/d_services/vomsdir/${lsc}",
            require => Exec[ 'chk_vomsdir' ];
        }
    }
}



And then, in this is in the init.pp:

# /etc/puppet/modules/d_services/manifests/init.pp:
--------------------------------------------------------------------
class voms_cert {

    include d_services::vomscert

    d_services::vomscert::voms {
        'camont.lsc':
        dir   => 'camont',
        lsc  => 'voms.gridpp.ac.uk.lsc';

        'atlas.lsc':
        dir   => 'gridpp',
        lsc  => 'voms.cern.ch.lsc';
    }
}



On the agent, it fails, reporting:

err: Could not retrieve catalog from remote server: Error 400 on
SERVER: Duplicate definition: Exec[chk_vomsdir] is already defined in
file /etc/puppet/modules/d_services/manifests/vomscert.pp at line 11;
cannot redefine at /etc/puppet/modules/d_services/manifests/
vomscert.pp:11

Any idea what am I missing?

Cheers,
San

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

Reply via email to