I have a definition in my puppet manifests called postgresql::user
I have put in the following, to make sure puppet doesn't try to do something twice:
if !defined (Postgresql::User["dbuser"]) {
postgresql::user { "dbuser":
ensure => present
}
}
However I am still getting the errors in puppetd --test
err: Could not retrieve catalog: Duplicate definition: Postgresql::User[dbuser] is already defined in file /etc/puppet/modules/dbserver/manifests/postgresql8-3.pp at line 22; cannot redefine at /etc/puppet/modules/dbserver/manifests/postgresql8-3.pp:7 on node mynode
I have a feeling it doesn't like the capitalisation and `::' when checking if defined. Is there way to escape this?