bigtop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From evan...@apache.org
Subject [bigtop] branch master updated: BIGTOP-3166. Update Kerberos module to comply with Puppet's syntax (#468)
Date Tue, 19 Feb 2019 04:49:42 GMT
This is an automated email from the ASF dual-hosted git repository.

evansye pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bigtop.git


The following commit(s) were added to refs/heads/master by this push:
     new 3386a9d  BIGTOP-3166. Update Kerberos module to comply with Puppet's syntax (#468)
3386a9d is described below

commit 3386a9d2d6898be01852f1d340d8948161eacdcd
Author: Evans Ye <evansye@apache.org>
AuthorDate: Tue Feb 19 12:49:38 2019 +0800

    BIGTOP-3166. Update Kerberos module to comply with Puppet's syntax (#468)
---
 .../puppet/modules/kerberos/manifests/init.pp      | 26 +++++++++++-----------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/bigtop-deploy/puppet/modules/kerberos/manifests/init.pp b/bigtop-deploy/puppet/modules/kerberos/manifests/init.pp
index c6480f8..8b2c603 100644
--- a/bigtop-deploy/puppet/modules/kerberos/manifests/init.pp
+++ b/bigtop-deploy/puppet/modules/kerberos/manifests/init.pp
@@ -23,8 +23,8 @@ class kerberos {
     }
   }
 
-  class site ($domain = inline_template('<%= domain %>'),
-      $realm = inline_template('<%= domain.upcase %>'),
+  class krb_site ($domain = inline_template('<%= @domain %>'),
+      $realm = inline_template('<%= @domain.upcase %>'),
       $kdc_server = 'localhost',
       $kdc_port = '88',
       $admin_port = 749,
@@ -73,7 +73,7 @@ class kerberos {
     }
   }
 
-  class kdc inherits kerberos::site {
+  class kdc inherits kerberos::krb_site {
     package { $package_name_kdc:
       ensure => installed,
     }
@@ -142,7 +142,7 @@ class kerberos {
     }
   }
 
-  class client inherits kerberos::site {
+  class client inherits kerberos::krb_site {
     package { $package_name_client:
       ensure => installed,
     }
@@ -163,23 +163,23 @@ class kerberos {
   define principal {
     require "kerberos::client"
 
-    realize(File[$kerberos::site::keytab_export_dir])
+    realize(File[$kerberos::krb_site::keytab_export_dir])
 
     $principal = "$title/$::fqdn"
-    $keytab    = "$kerberos::site::keytab_export_dir/$title.keytab"
+    $keytab    = "$kerberos::krb_site::keytab_export_dir/$title.keytab"
 
     exec { "addprinc.$title":
-      path => $kerberos::site::exec_path,
+      path => $kerberos::krb_site::exec_path,
       command => "kadmin -w secure -p kadmin/admin -q 'addprinc -randkey $principal'",
       unless => "kadmin -w secure -p kadmin/admin -q listprincs | grep -q $principal",
-      require => Package[$kerberos::site::package_name_client],
+      require => Package[$kerberos::krb_site::package_name_client],
     } 
     ->
     exec { "xst.$title":
-      path    => $kerberos::site::exec_path, 
+      path    => $kerberos::krb_site::exec_path,
       command => "kadmin -w secure -p kadmin/admin -q 'xst -k $keytab $principal'",
       unless  => "klist -kt $keytab 2>/dev/null | grep -q $principal",
-      require => File[$kerberos::site::keytab_export_dir],
+      require => File[$kerberos::krb_site::keytab_export_dir],
     }
   }
 
@@ -196,7 +196,7 @@ class kerberos {
 
     $includes = inline_template("<%=
       [@princs, @internal_princs].flatten.map { |x|
-        \"rkt $kerberos::site::keytab_export_dir/#{x}.keytab\"
+        \"rkt $kerberos::krb_site::keytab_export_dir/#{x}.keytab\"
       }.join(\"\n\")
     %>")
 
@@ -204,7 +204,7 @@ class kerberos {
     }
 
     exec { "ktinject.$title":
-      path     => $kerberos::site::exec_path,
+      path     => $kerberos::krb_site::exec_path,
       command  => "ktutil <<EOF
         $includes
         wkt $keytab
@@ -217,7 +217,7 @@ EOF
     }
 
     exec { "aquire $title keytab":
-        path    => $kerberos::site::exec_path,
+        path    => $kerberos::krb_site::exec_path,
         user    => $owner,
         command => "bash -c 'kinit -kt $keytab ${title}/$::fqdn ; kinit -R'",
         require => Exec["ktinject.$title"],


Mime
View raw message