Closed nanliu closed 10 years ago
I am running this version of this module and still get the conflict.
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Duplicate declaration: File[/opt/staging] is already declared in file /etc/puppetlabs/puppet/environments/production/modules/staging/manifests/init.pp:28; cannot redeclare at /opt/puppet/share/puppet/modules/pe_staging/manifests/init.pp:25 on node puppet-master01.corp.uber.internal Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping run
@micah-uber, for this to work seamlessly, this patch needs to be applied to pe_staging as well. PuppetLabs rejected the fix and the upstream ticket is still open: https://tickets.puppetlabs.com/browse/ENTERPRISE-258
I'm looking at PE 3.7.1 shipped pe_staging module and the manifests does not have the conditional wrapper:
# This module manages staging and extraction of files from various sources.
#
# #### Actions:
#
# Creates the root staging directory. By default files will be created in a subdirectory matching the caller_module_name.
#
# /opt/staging/
# |-- puppet
# | `-- puppet.enterprise.2.0.tar.gz
# `-- tomcat
# `-- tomcat.5.0.tar.gz
#
class pe_staging (
$path = '/opt/staging', #: staging directory filepath
$owner = '0', #: staging directory owner
$group = '0', #: staging directory group
$mode = '0755' #: staging directory permission
) {
file { $path:
ensure => directory,
owner => $owner,
group => $group,
mode => $mode,
}
}
For now, you should be able to work around the problem in site.pp (since this declares the classes in an order that does not conflict):
include "pe_staging"
include "staging"
I'm open for other suggestions.
https://tickets.puppetlabs.com/browse/ENTERPRISE-258