Hi all,
I'm developing my own module, and i want to declare same resources in different class like this :
This resource is used to configure my Jboss server by copying conf files in /myappbase/applis/conf
class srhjboss::config::applis {
file { "/myappbase/applis/conf":
ensure
=> directory,
notify
=> Class['srhjboss::service'],
recurse
=> true,
source
=> 'puppet:///modules/srhjboss/communs',
}
The second class and resource is used to deploy the conf file of my war application like this :
class srhdeployit::war {
file { "/myappbase/applis/conf"':
source => "puppet://puppet/srnrepo/myappname",
}
then i include the class in the node
node default {
include srhjboss::config::applis
include srhdeployit::war
I got the exact failure :
err: Failed to apply catalog: Cannot alias File[ ' ' ] to ["/sirhen/applis/conf"] at /etc/puppet/modules/srhjboss/manifests/config/applis.pp:47; resource ["File", "/sirhen/applis/conf"] already declared at /etc/puppet/modules/srhdeployit/manifests/war.pp:44
Do you have suggestions on how to do it?
Thanks