Hi,
Please forgive me, as this is probably a result of my own stupidity, but
I'm very confused with my occurrence of this issue. I'm running
OracleLinux 6.4, Puppet Agent 2.7, PuppetMaster 3.2.2, PuppetDB 1.3.2, and
Foreman 1.2.2. I have a wrapper class for a customer LAMP project which
has two subclasses, one for web and another for database, setup resources
and include classes appropriate to those node roles.
When I apply the database subclass in development - this is a
from-scratch unattended provision from Foreman - the module applies
wonderfully to the throw-away dev node. When I apply the module to Test, I
get:
Error 400 on SERVER: Duplicate declaration: Class[Mysql] is already
> declared in file
> /etc/puppet/environments/test/modules/foo/manifests/database.pp at line 6;
>
I have tried deleting the Host from Foreman, on the puppetmaster running
a puppet node deactivate, removing the agent ssl directory and rerunning
puppet. After this, the host appears in Foreman with out a HostGroup and
with no Classes. If I apply this class in a clean host state the error
persists. Could this be a Foreman Database issue or perhaps a PuppetDB
issue? I have run into problems before where I have moved a host between
host groups and seen something like this where both the previous and the
current host group declared the same class. That doesn't seem to be the
case this time.
The module subclass is quite simple looks like:
class foo::database {
>
> include foo
>
> class { 'puppet':
> template => 'bar/puppet/shared_ssl.puppet.conf.erb',
> # <— line 6
> }
>
> class { 'mysql':
> template => 'foo/mysql.conf.erb',
> root_password => 'auto',
}
>
@user { 'mysql':
> groups => [ 'puppet' ],
> }
> realize User['mysql']
>
> }
>
Thank you and kind regards,