Skip to content
This repository has been archived by the owner on Oct 22, 2019. It is now read-only.

Aliasing File[ssl_cert] fails when both class {'ldap::server::master':} and class {'ldap':} are defined #15

Open
strocknar opened this issue Jul 19, 2013 · 1 comment
Assignees
Labels

Comments

@strocknar
Copy link

I have a base_node that has an ldap client definition and an ldap_master node that inherits base_node. With this configuration, I get the following error:

Error: Failed to apply catalog: Cannot alias File[ssl_cert] to ["/etc/ssl/certs/mycert.pem"] at /etc/puppet/modules/ldap/manifests/server/master.pp:199; resource ["File", "/etc/ssl/certs/mycert.pem"] already declared at /etc/puppet/modules/ldap/manifests/init.pp:214

    node base_node {
            class { 'pam::pamd':
                    pam_ldap => true,
            }

            class { 'ldap':
                    uri => 'ldap://ldap_master',
                    base => 'dc=example,dc=com',
                    ssl => true,
                    ssl_cert => 'mycert.pem',
                    nsswitch => true,
                    nss_passwd => 'ou=users',
                    nss_shadow => 'ou=users',
                    nss_group => 'ou=groups',
                    pam => true
            }
    }

    node default inherits base_node {
    }

    node ldap_master inherits base_node {
            class {'ldap::server::master':
                    suffix => 'dc=example,dc=com',
                    rootpw => '',
                    ssl => true,
                    ssl_ca => 'ldap_master.ca',
                    ssl_cert => 'mycert.pem',
                    ssl_key => 'ldap_master.key',
            }
    }
@ghost ghost assigned torian Jul 19, 2013
@strocknar
Copy link
Author

I was able to get around this by doing the following:

copy /etc/puppet/files/ldap/mycert.pem to /etc/puppet/files/ldap/mycert.copy.pem
in the ldap_master node definition: ssl_cert => 'mycert.pem'
in the default node definition: ssl_cert => 'mycert.copy.pem'

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants