BIGTOP-2410 : Making ldap_username_pattern variable templatize in puppet module 
of hue

Signed-off-by: Olaf Flebbe <[email protected]>


Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo
Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/67bc8230
Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/67bc8230
Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/67bc8230

Branch: refs/heads/master
Commit: 67bc8230afcccfaebe5ddc9bd5457fa4542d27b3
Parents: 30001c3
Author: Amit Kabra <[email protected]>
Authored: Tue Apr 26 11:47:08 2016 +0530
Committer: Olaf Flebbe <[email protected]>
Committed: Tue Apr 26 21:45:46 2016 +0200

----------------------------------------------------------------------
 bigtop-deploy/puppet/modules/hue/manifests/init.pp | 2 ++
 bigtop-deploy/puppet/modules/hue/templates/hue.ini | 6 +++++-
 2 files changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/bigtop/blob/67bc8230/bigtop-deploy/puppet/modules/hue/manifests/init.pp
----------------------------------------------------------------------
diff --git a/bigtop-deploy/puppet/modules/hue/manifests/init.pp 
b/bigtop-deploy/puppet/modules/hue/manifests/init.pp
index c4f70ca..2b11d2f 100644
--- a/bigtop-deploy/puppet/modules/hue/manifests/init.pp
+++ b/bigtop-deploy/puppet/modules/hue/manifests/init.pp
@@ -33,6 +33,8 @@ class hue {
                $force_username_lowercase = "false",
                $group_filter_value = "objectclass=groupOfEntries",
                $nt_domain = undef,
+               $use_ldap_username_pattern = false,
+               $ldap_username_pattern = undef,
                $rm_logical_name = undef, $rm_api_port = "8088", $app_blacklist 
= "impala, security",
                $hue_host = "0.0.0.0", $hue_port = "8888", $hue_timezone = 
"America/Los_Angeles",
                $default_fs = "hdfs://localhost:8020",

http://git-wip-us.apache.org/repos/asf/bigtop/blob/67bc8230/bigtop-deploy/puppet/modules/hue/templates/hue.ini
----------------------------------------------------------------------
diff --git a/bigtop-deploy/puppet/modules/hue/templates/hue.ini 
b/bigtop-deploy/puppet/modules/hue/templates/hue.ini
index 30269b2..41045ba 100644
--- a/bigtop-deploy/puppet/modules/hue/templates/hue.ini
+++ b/bigtop-deploy/puppet/modules/hue/templates/hue.ini
@@ -234,8 +234,12 @@
 <%     else -%>
     # Pattern for searching for usernames -- Use <username> for the parameter
     # For use when using LdapBackend for Hue authentication
-    #    ldap_username_pattern="uid=<username>,ou=People,dc=mycompany,dc=com"
 
+<%     if @use_ldap_username_pattern -%>
+    # for example, 
ldap_username_pattern=uid=<username>,ou=People,dc=mycompany,dc=com
+    ldap_username_pattern="<%= @ldap_username_pattern %>"
+<%     end -%> 
+ 
     search_bind_authentication=false
 <%     end -%>
     # Execute this script to produce the bind user password. This will be used

Reply via email to