Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'referrals' parameter does not work properly #42

Closed
wfsaxton opened this issue Mar 9, 2017 · 3 comments
Closed

'referrals' parameter does not work properly #42

wfsaxton opened this issue Mar 9, 2017 · 3 comments
Assignees
Labels
Milestone

Comments

@wfsaxton
Copy link

wfsaxton commented Mar 9, 2017

Running latest version of puppet on Oracle Linux 7.2.

class { 'openldap':
    notify => Service['autofs'],
    referrals => false,
    tls_reqcert => 'never',
    uri => ['ldap://cr-lc-sca-01.example.com/', 'ldap://cr-lc-sca-02.example.com/'],
    base => 'dc=example,dc=com',
    tls_cacertdir => '/etc/openldap/cacerts'
}

produces

# !!! Managed by Puppet !!!

URI                             ldap://cr-lc-sca-01.example.com/ ldap://cr-lc-sca-02.example.com/
BASE                            dc=example,dc=com
TLS_CACERTDIR                   /etc/openldap/cacerts
TLS_REQCERT                     never

Setting "referrals => true" produces

# !!! Managed by Puppet !!!

BASE                            dc=example,dc=com
REFERRALS                       on
TLS_CACERTDIR                   /etc/openldap/cacerts
TLS_REQCERT                     never

Since the default behavior is "on" there is no way off turning referrals "off" with this module.

@wfsaxton
Copy link
Author

wfsaxton commented Mar 9, 2017

Not a ruby expert, but I think in ldap.conf.erb:

<% if @referrals -%> 

should be something like:

<% if defined?(@referrals) -%>

@bodgit
Copy link
Owner

bodgit commented Mar 9, 2017

Good catch. The pattern I've used elsewhere in other templates is:

<% unless @referrals.nil? -%>

That means it only processes the block if @referrals is not undef rather than testing the "truthiness" of it.

@bodgit bodgit self-assigned this Mar 9, 2017
@bodgit bodgit added the bug label Mar 9, 2017
@bodgit bodgit added this to the v1.4.1 milestone Mar 9, 2017
@bodgit
Copy link
Owner

bodgit commented Mar 9, 2017

I found some more instances of the same bug in that template so I've fixed those up as well, (I guess even fewer people use this with GSSAPI). Version 1.4.1 should be up on the forge with this fixed.

Thanks for the bug report!

@bodgit bodgit closed this as completed Mar 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants