I am using the puppet logstash module from Forge installed at /etc/puppet/modules/logstash
I am trying to setup my profile class as profiles::logstash. My manifest is at /etc/puppet/modules/profiles/manifests/logstash.pp
In my /etc/puppet/modules/profiles/manifests/logstash directory I have:
install.pp
config.pp
service.pp
In my install.pp:
class profiles::logstash::install() {
$ensure = $profiles::logstash::enable ? {true => present, default => absent}
class { 'logstash':
ensure => $ensure,
version => $profiles::logstash::version
}
}
Here, class refers to the /etc/puppet/modules/logstash not /etc/puppet/modules/profiles/manifests/logstash
However, when I do a run, it tells me
Could not retrieve catalog from remote server: Error 400 on SERVER: Duplicate declaration: Class[Profiles::Logstash] is already declared; cannot redeclare at /etc/puppet/modules/profiles/manifests/logstash/install.pp:8
It is referring to the "class {'logstash'" line.
What's the proper way to disambiguate so I can still tell the puppet logstash module to install logstash and ensure the right version?