Explorar o código

adding coop puppet scripts

neal %!s(int64=5) %!d(string=hai) anos
pai
achega
ec5ca53161
Modificáronse 100 ficheiros con 7037 adicións e 0 borrados
  1. 46 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/README.md
  2. 126 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/Vagrantfile
  3. 8 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/hiera.yaml
  4. 15 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/hieradata/admin.example.com.yaml
  5. 63 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/hieradata/common.yaml
  6. 2 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/hieradata/development.yaml
  7. 12 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/hieradata/node1.example.com.yaml
  8. 12 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/hieradata/node2.example.com.yaml
  9. 2 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/hieradata/production.yaml
  10. 330 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/manifests/node.pp
  11. 712 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/manifests/site.pp
  12. 10 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/jdk7/Gemfile
  13. 201 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/jdk7/License
  14. 9 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/jdk7/Modulefile
  15. 88 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/jdk7/README.md
  16. 40 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/jdk7/Rakefile
  17. 6 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/jdk7/manifests/init.pp
  18. 127 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/jdk7/manifests/install7.pp
  19. 108 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/jdk7/manifests/javaexec.pp
  20. 72 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/jdk7/manifests/urandomfix.pp
  21. 13 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/jdk7/metadata.json
  22. 72 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/jdk7/spec/classes/urandomfix_spec.rb
  23. 6 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/jdk7/spec/spec.opts
  24. 2 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/jdk7/spec/spec_helper.rb
  25. 4 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/limits/Changelog
  26. 6 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/limits/Modulefile
  27. 84 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/limits/README.md
  28. 2 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/limits/Rakefile
  29. 15 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/limits/example.yaml
  30. 202 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/limits/manifests/domain.pp
  31. 67 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/limits/manifests/entry.pp
  32. 14 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/limits/manifests/init.pp
  33. 23 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/limits/manifests/set.pp
  34. 28 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/limits/metadata.json
  35. 2 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/limits/spec/spec_helper.rb
  36. 10 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/orautils/Gemfile
  37. 93 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/orautils/Gemfile.lock
  38. 201 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/orautils/License
  39. 9 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/orautils/Modulefile
  40. 140 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/orautils/README.md
  41. 40 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/orautils/Rakefile
  42. 246 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/orautils/manifests/init.pp
  43. 84 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/orautils/manifests/nodemanagerautostart.pp
  44. 104 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/orautils/manifests/params.pp
  45. 13 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/orautils/metadata.json
  46. 6 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/orautils/spec/spec.opts
  47. 2 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/orautils/spec/spec_helper.rb
  48. 59 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/orautils/templates/cleanOracleEnvironment.sh.erb
  49. 181 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/orautils/templates/nodemanager.erb
  50. 38 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/orautils/templates/startNodeManager.sh.erb
  51. 55 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/orautils/templates/startWeblogicAdmin.sh.erb
  52. 52 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/orautils/templates/stopWeblogicAdmin.sh.erb
  53. 119 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/orautils/templates/wls/showStatus.sh.erb
  54. 23 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/orautils/templates/wls/stopNodeManager.sh.erb
  55. 278 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/CHANGELOG
  56. 65 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/CONTRIBUTING.md
  57. 42 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/Gemfile
  58. 19 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/LICENSE
  59. 11 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/Modulefile
  60. 1194 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/README.markdown
  61. 35 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/README_DEVELOPER.markdown
  62. 7 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/README_SPECS.markdown
  63. 24 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/RELEASE_PROCESS.markdown
  64. 2 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/Rakefile
  65. 202 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/facter/facter_dot_d.rb
  66. 53 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/facter/pe_version.rb
  67. 26 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/facter/puppet_vardir.rb
  68. 19 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/facter/root_home.rb
  69. 21 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/facter/util/puppet_settings.rb
  70. 36 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/abs.rb
  71. 33 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/any2array.rb
  72. 49 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/bool2num.rb
  73. 34 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/capitalize.rb
  74. 35 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/chomp.rb
  75. 37 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/chop.rb
  76. 37 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/concat.rb
  77. 22 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/count.rb
  78. 35 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/defined_with_params.rb
  79. 46 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/delete.rb
  80. 49 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/delete_at.rb
  81. 15 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/dirname.rb
  82. 33 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/downcase.rb
  83. 28 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/empty.rb
  84. 24 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/ensure_packages.rb
  85. 45 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/ensure_resource.rb
  86. 33 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/flatten.rb
  87. 20 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/floor.rb
  88. 46 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/fqdn_rotate.rb
  89. 17 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/get_module_path.rb
  90. 35 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/getparam.rb
  91. 26 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/getvar.rb
  92. 33 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/grep.rb
  93. 52 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/has_interface_with.rb
  94. 25 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/has_ip_address.rb
  95. 25 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/has_ip_network.rb
  96. 28 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/has_key.rb
  97. 41 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/hash.rb
  98. 22 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/is_array.rb
  99. 47 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/is_domain_name.rb
  100. 27 0
      puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/is_float.rb

+ 46 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/README.md

@@ -0,0 +1,46 @@
+biemond-orawls-vagrant
+=======================
+
+The reference implementation of https://github.com/biemond/biemond-wls  
+
+uses CentOS 6.5 box with puppet 3.4.0
+
+creates a patched 10.3.6 WebLogic cluster ( admin,node1 , node2 )
+
+
+site.pp is located here:  
+https://github.com/biemond/biemond-wls-vagrant-10.3.6/blob/master/puppet/manifests/site.pp  
+
+Add the all the Oracle binaris to /software, edit Vagrantfile and update
+- admin.vm.synced_folder "/Users/edwin/software", "/software"
+- node1.vm.synced_folder "/Users/edwin/software", "/software"
+- node2.vm.synced_folder "/Users/edwin/software", "/software"
+
+used the following software
+- jdk-7u45-linux-x64.tar.gz
+
+weblogic 10.3.6
+- wls1036_generic.jar
+- p17071663_1036_Generic.zip
+
+Using the following facts
+
+- environment => "development"
+- vm_type     => "vagrant"
+
+
+# admin server  
+vagrant up admin
+
+# node1  
+vagrant up node1
+
+# node2  
+vagrant up node2
+
+
+Detailed vagrant steps (setup) can be found here:
+
+http://vbatik.wordpress.com/2013/10/11/weblogic-12-1-2-00-with-vagrant/
+
+For Mac Users.  The procedure has been and run tested on Mac.

+ 126 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/Vagrantfile

@@ -0,0 +1,126 @@
+# -*- mode: ruby -*-
+# vi: set ft=ruby :
+
+# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
+VAGRANTFILE_API_VERSION = "2"
+
+Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
+
+  config.vm.define "admin" , primary: true do |admin|
+    admin.vm.box = "centos-6.5-x86_64"
+    #admin.vm.box_url ="/Users/edwin/Downloads/centos-6.5-x86_64.box"
+    admin.vm.box_url = "https://dl.dropboxusercontent.com/s/np39xdpw05wfmv4/centos-6.5-x86_64.box"
+
+    admin.vm.hostname = "admin.example.com"
+
+    admin.vm.synced_folder ".", "/vagrant", :mount_options => ["dmode=777","fmode=777"]
+    admin.vm.synced_folder "software", "/software"
+    #admin.vm.synced_folder "."                    , "/vagrant" , type: "nfs"
+    #admin.vm.synced_folder "/Users/edwin/software", "/software", type: "nfs"
+  
+    admin.vm.network :private_network, ip: "10.10.10.10"
+  
+    admin.vm.provider :virtualbox do |vb|
+      vb.customize ["modifyvm", :id, "--memory", "2048"]
+      vb.customize ["modifyvm", :id, "--name", "admin"]
+    end
+  
+    admin.vm.provision :shell, :inline => "ln -sf /vagrant/puppet/hiera.yaml /etc/puppet/hiera.yaml"
+    
+    admin.vm.provision :puppet do |puppet|
+      puppet.manifests_path    = "puppet/manifests"
+      puppet.module_path       = "puppet/modules"
+      puppet.manifest_file     = "site.pp"
+      puppet.options           = "--verbose --hiera_config /vagrant/puppet/hiera.yaml"
+  
+      puppet.facter = {
+        "environment"                     => "development",
+        "vm_type"                         => "vagrant",
+        "override_weblogic_user"          => "wls",
+        "override_weblogic_domain_folder" => "/opt/oracle/wlsdomains",
+      }
+      
+    end
+  
+  end
+  
+  config.vm.define "node1" do |node1|
+
+    node1.vm.box = "centos-6.5-x86_64"
+    #node1.vm.box_url ="/Users/edwin/Downloads/centos-6.5-x86_64.box"
+    node1.vm.box_url = "https://dl.dropboxusercontent.com/s/np39xdpw05wfmv4/centos-6.5-x86_64.box"
+  
+    node1.vm.hostname = "node1.example.com"
+    node1.vm.network :private_network, ip: "10.10.10.100"
+
+    node1.vm.synced_folder ".", "/vagrant", :mount_options => ["dmode=777","fmode=777"]
+    node1.vm.synced_folder "software", "/software"
+
+    #node1.vm.synced_folder "."                    , "/vagrant" , type: "nfs"
+    #node1.vm.synced_folder "/Users/edwin/software", "/software", type: "nfs"
+  
+    node1.vm.provider :virtualbox do |vb|
+      vb.customize ["modifyvm", :id, "--memory", "1532"]
+      vb.customize ["modifyvm", :id, "--name", "node1"]
+    end
+  
+    node1.vm.provision :shell, :inline => "ln -sf /vagrant/puppet/hiera.yaml /etc/puppet/hiera.yaml"
+    
+    node1.vm.provision :puppet do |puppet|
+      puppet.manifests_path    = "puppet/manifests"
+      puppet.module_path       = "puppet/modules"
+      puppet.manifest_file     = "node.pp"
+      puppet.options           = "--verbose --hiera_config /vagrant/puppet/hiera.yaml"
+  
+      puppet.facter = {
+        "environment"                     => "development",
+        "vm_type"                         => "vagrant",
+        "override_weblogic_user"          => "wls",
+        "override_weblogic_domain_folder" => "/opt/oracle/wlsdomains",
+      }
+      
+    end
+
+  end
+
+  config.vm.define "node2" do |node2|
+
+    node2.vm.box = "centos-6.5-x86_64"
+    #node2.vm.box_url ="/Users/edwin/Downloads/centos-6.5-x86_64.box"
+    node2.vm.box_url = "https://dl.dropboxusercontent.com/s/np39xdpw05wfmv4/centos-6.5-x86_64.box"
+
+    node2.vm.hostname = "node2.example.com"
+    node2.vm.network :private_network, ip: "10.10.10.200", auto_correct: true
+
+    node2.vm.synced_folder ".", "/vagrant", :mount_options => ["dmode=777","fmode=777"]
+    node2.vm.synced_folder "software", "/software"
+
+    #node2.vm.synced_folder "."                    , "/vagrant" , type: "nfs"
+    #node2.vm.synced_folder "/Users/edwin/software", "/software", type: "nfs"
+  
+    node2.vm.provider :virtualbox do |vb|
+      vb.customize ["modifyvm", :id, "--memory", "1532"]
+      vb.customize ["modifyvm", :id, "--name", "node2"]
+    end
+  
+    node2.vm.provision :shell, :inline => "ln -sf /vagrant/puppet/hiera.yaml /etc/puppet/hiera.yaml"
+    
+    node2.vm.provision :puppet do |puppet|
+      puppet.manifests_path    = "puppet/manifests"
+      puppet.module_path       = "puppet/modules"
+      puppet.manifest_file     = "node.pp"
+      puppet.options           = "--verbose --hiera_config /vagrant/puppet/hiera.yaml"
+  
+      puppet.facter = {
+        "environment"                     => "development",
+        "vm_type"                         => "vagrant",
+        "override_weblogic_user"          => "wls",
+        "override_weblogic_domain_folder" => "/opt/oracle/wlsdomains",
+      }
+      
+    end
+
+  end
+
+
+end

+ 8 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/hiera.yaml

@@ -0,0 +1,8 @@
+---
+:backends: yaml
+:yaml:
+  :datadir: /vagrant/puppet/hieradata
+:hierarchy: 
+  - "%{::fqdn}"
+  - "%{::environment}"
+  - common

+ 15 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/hieradata/admin.example.com.yaml

@@ -0,0 +1,15 @@
+---
+messageEnv: 'admin'
+
+
+# when you have just one domain on a server
+domain_name:                "Wls1036"
+domain_adminserver:         "AdminServer"
+domain_adminserver_address: "10.10.10.10"
+domain_adminserver_port:    7001
+domain_nodemanager_port:    5556
+domain_wls_password:        "weblogic1"
+domain_user_config_file:    "/home/wls/oracle-Wls1036-WebLogicConfig.properties"
+domain_user_key_file:       "/home/wls/oracle-Wls1036-WebLogicKey.properties"
+
+domain_template:            "standard"

+ 63 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/hieradata/common.yaml

@@ -0,0 +1,63 @@
+---
+messageDefault: 'default'
+messageEnv:     'common'
+
+
+hosts:
+  'admin.example.com':
+    ip:                "10.10.10.10"
+    host_aliases:      - 'admin'
+  'node1.example.com':
+    ip:                "10.10.10.100"
+    host_aliases:      - 'node1'
+  'node2.example.com':
+    ip:                "10.10.10.200"
+    host_aliases:      - 'node2'
+  'localhost':
+    ip:                "127.0.0.1"
+    host_aliases:      - 'localhost.localdomain'
+                       - 'localhost4'
+                       - 'localhost4.localdomain4'
+
+wls_jdk_version:          'jdk1.7.0_181'
+wls_user_config_dir:      '/home/wls'
+
+# global WebLogic vars
+wls_oracle_base_home_dir: &wls_oracle_base_home_dir "/opt/oracle"
+wls_weblogic_user:        &wls_weblogic_user        "weblogic"
+wls_weblogic_home_dir:    &wls_weblogic_home_dir    "/opt/oracle/middleware11g/wlserver_10.3"
+wls_middleware_home_dir:  &wls_middleware_home_dir  "/opt/oracle/middleware11g"
+wls_version:              &wls_version              "1111"
+
+# global OS vars
+wls_os_user:              &wls_os_user              "wls"
+wls_os_group:             &wls_os_group             "dba"
+wls_download_dir:         &wls_download_dir         "/data/install"
+wls_source:               &wls_source               "/software"
+wls_remote_file:                                    false
+wls_jdk_home_dir:         &wls_jdk_home_dir         "/usr/java/jdk1.7.0_181"
+wls_log_dir:              &wls_log_dir              "/data/logs"
+
+wls_domains_path_dir:      "/opt/oracle/wlsdomains/domains"
+
+
+# handy WebLogic scripts in /opt/scripts/wls
+orautils::osOracleHomeParam:      *wls_oracle_base_home_dir
+orautils::oraInventoryParam:      "/opt/oracle/oraInventory"
+orautils::osDomainTypeParam:      "admin"
+orautils::osLogFolderParam:       *wls_log_dir
+orautils::osDownloadFolderParam:  *wls_download_dir
+orautils::osMdwHomeParam:         *wls_middleware_home_dir
+orautils::osWlHomeParam:          *wls_weblogic_home_dir
+orautils::oraUserParam:           *wls_os_user
+
+orautils::osDomainParam:          "Wls1036"
+orautils::osDomainPathParam:      "/opt/oracle/wlsdomains/domains/Wls1036"
+orautils::nodeMgrPathParam:       "/opt/oracle/middleware11g/wlserver_10.3/server/bin"
+
+orautils::nodeMgrPortParam:       5556
+orautils::wlsUserParam:           *wls_weblogic_user
+orautils::wlsPasswordParam:       "weblogic1"
+orautils::wlsAdminServerParam:    "AdminServer"
+
+

+ 2 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/hieradata/development.yaml

@@ -0,0 +1,2 @@
+---
+messageEnv: 'development'

+ 12 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/hieradata/node1.example.com.yaml

@@ -0,0 +1,12 @@
+---
+messageEnv: 'node1'
+
+domain_name:                "Wls1036"
+
+domain_node_address:        "10.10.10.100"
+domain_nodemanager_port:    5556
+
+domain_adminserver_address: "10.10.10.10"
+domain_adminserver_port:    7001
+
+domain_wls_password:        "weblogic1"

+ 12 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/hieradata/node2.example.com.yaml

@@ -0,0 +1,12 @@
+---
+messageEnv: 'node2'
+
+domain_name:                "Wls1036"
+
+domain_node_address:        "10.10.10.200"
+domain_nodemanager_port:    5556
+
+domain_adminserver_address: "10.10.10.10"
+domain_adminserver_port:    7001
+
+domain_wls_password:        "weblogic1"

+ 2 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/hieradata/production.yaml

@@ -0,0 +1,2 @@
+---
+messageEnv: 'production'

+ 330 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/manifests/node.pp

@@ -0,0 +1,330 @@
+# test
+#
+# one machine setup with weblogic 12.1.2
+# creates an WLS Domain with JAX-WS (advanced, soap over jms)
+# needs jdk7, orawls, orautils, fiddyspence-sysctl, erwbgy-limits puppet modules
+#
+
+node 'node1.example.com', 'node2.example.com' {
+
+   include os,java, ssh, orautils 
+   include wls1036
+   include maintenance
+   include copydomain
+   
+   Class['os']  -> 
+     Class['ssh']  -> 
+       Class['java']  -> 
+         Class['wls1036'] ->
+           Class['copydomain']
+}
+
+
+# operating settings for Middleware
+class os {
+
+  notice "class os ${operatingsystem}"
+
+  $default_params = {}
+  $host_instances = hiera('hosts', [])
+  create_resources('host',$host_instances, $default_params)
+
+  exec { "create swap file":
+    command => "/bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=8192",
+    creates => "/var/swap.1",
+  }
+
+  exec { "attach swap file":
+    command => "/sbin/mkswap /var/swap.1 && /sbin/swapon /var/swap.1",
+    require => Exec["create swap file"],
+    unless => "/sbin/swapon -s | grep /var/swap.1",
+  }
+
+  #add swap file entry to fstab
+  exec {"add swapfile entry to fstab":
+    command => "/bin/echo >>/etc/fstab /var/swap.1 swap swap defaults 0 0",
+    require => Exec["attach swap file"],
+    user => root,
+    unless => "/bin/grep '^/var/swap.1' /etc/fstab 2>/dev/null",
+  }
+
+  service { iptables:
+        enable    => false,
+        ensure    => false,
+        hasstatus => true,
+  }
+
+  group { 'dba' :
+    ensure => present,
+  }
+
+  # http://raftaman.net/?p=1311 for generating password
+  # password = oracle
+  user { 'wls' :
+    ensure     => present,
+    groups     => 'dba',
+    shell      => '/bin/bash',
+    password   => '$1$DSJ51vh6$4XzzwyIOk6Bi/54kglGk3.',
+    home       => "/home/wls",
+    comment    => 'wls user created by Puppet',
+    managehome => true,
+    require    => Group['dba'],
+  }
+
+
+  $install = [ 'binutils.x86_64','unzip.x86_64']
+
+
+  package { $install:
+    ensure  => present,
+  }
+
+  class { 'limits':
+    config => {
+               '*'       => {  'nofile'  => { soft => '2048'   , hard => '8192',   },},
+               'wls'     => {  'nofile'  => { soft => '65536'  , hard => '65536',  },
+                               'nproc'   => { soft => '2048'   , hard => '16384',   },
+                               'memlock' => { soft => '1048576', hard => '1048576',},
+                               'stack'   => { soft => '10240'  ,},},
+               },
+    use_hiera => false,
+  }
+
+  sysctl { 'kernel.msgmnb':                 ensure => 'present', permanent => 'yes', value => '65536',}
+  sysctl { 'kernel.msgmax':                 ensure => 'present', permanent => 'yes', value => '65536',}
+  sysctl { 'kernel.shmmax':                 ensure => 'present', permanent => 'yes', value => '2588483584',}
+  sysctl { 'kernel.shmall':                 ensure => 'present', permanent => 'yes', value => '2097152',}
+  sysctl { 'fs.file-max':                   ensure => 'present', permanent => 'yes', value => '6815744',}
+  sysctl { 'net.ipv4.tcp_keepalive_time':   ensure => 'present', permanent => 'yes', value => '1800',}
+  sysctl { 'net.ipv4.tcp_keepalive_intvl':  ensure => 'present', permanent => 'yes', value => '30',}
+  sysctl { 'net.ipv4.tcp_keepalive_probes': ensure => 'present', permanent => 'yes', value => '5',}
+  sysctl { 'net.ipv4.tcp_fin_timeout':      ensure => 'present', permanent => 'yes', value => '30',}
+  sysctl { 'kernel.shmmni':                 ensure => 'present', permanent => 'yes', value => '4096', }
+  sysctl { 'fs.aio-max-nr':                 ensure => 'present', permanent => 'yes', value => '1048576',}
+  sysctl { 'kernel.sem':                    ensure => 'present', permanent => 'yes', value => '250 32000 100 128',}
+  sysctl { 'net.ipv4.ip_local_port_range':  ensure => 'present', permanent => 'yes', value => '9000 65500',}
+  sysctl { 'net.core.rmem_default':         ensure => 'present', permanent => 'yes', value => '262144',}
+  sysctl { 'net.core.rmem_max':             ensure => 'present', permanent => 'yes', value => '4194304', }
+  sysctl { 'net.core.wmem_default':         ensure => 'present', permanent => 'yes', value => '262144',}
+  sysctl { 'net.core.wmem_max':             ensure => 'present', permanent => 'yes', value => '1048576',}
+
+}
+
+class ssh {
+  require os
+
+  notice 'class ssh'
+
+  file { "/home/wls/.ssh/":
+    owner  => "wls",
+    group  => "dba",
+    mode   => "700",
+    ensure => "directory",
+    alias  => "wls-ssh-dir",
+  }
+  
+  file { "/home/wls/.ssh/id_rsa.pub":
+    ensure  => present,
+    owner   => "wls",
+    group   => "dba",
+    mode    => "644",
+    source  => "/vagrant/ssh/id_rsa.pub",
+    require => File["wls-ssh-dir"],
+  }
+  
+  file { "/home/wls/.ssh/id_rsa":
+    ensure  => present,
+    owner   => "wls",
+    group   => "dba",
+    mode    => "600",
+    source  => "/vagrant/ssh/id_rsa",
+    require => File["wls-ssh-dir"],
+  }
+  
+  file { "/home/wls/.ssh/authorized_keys":
+    ensure  => present,
+    owner   => "wls",
+    group   => "dba",
+    mode    => "644",
+    source  => "/vagrant/ssh/id_rsa.pub",
+    require => File["wls-ssh-dir"],
+  }        
+}
+
+class java {
+  require os
+
+  notice 'class java'
+
+  $remove = [ "java-1.7.0-openjdk.x86_64", "java-1.6.0-openjdk.x86_64" ]
+
+  package { $remove:
+    ensure  => absent,
+  }
+
+  include jdk7
+
+  jdk7::install7{ 'jdk1.7.0_181':
+      version              => "7u181" , 
+      fullVersion          => "jdk1.7.0_181",
+      alternativesPriority => 18000, 
+      x64                  => true,
+      downloadDir          => hiera('wls_download_dir'),
+      urandomJavaFix       => true,
+      sourcePath           => hiera('wls_source'),
+  }
+
+}
+
+class wls1036{
+
+   class { 'wls::urandomfix' :}
+
+   $jdkWls11gJDK  = hiera('wls_jdk_version')
+   $wls11gVersion = hiera('wls_version')
+                       
+   $puppetDownloadMntPoint = hiera('wls_source')                       
+ 
+   $osOracleHome = hiera('wls_oracle_base_home_dir')
+   $osMdwHome    = hiera('wls_middleware_home_dir')
+   $osWlHome     = hiera('wls_weblogic_home_dir')
+   $user         = hiera('wls_os_user')
+   $group        = hiera('wls_os_group')
+   $downloadDir  = hiera('wls_download_dir')
+   $logDir       = hiera('wls_log_dir')     
+
+  # set the defaults
+  Wls::Installwls {
+    version                => $wls11gVersion,
+    fullJDKName            => $jdkWls11gJDK,
+    oracleHome             => $osOracleHome,
+    mdwHome                => $osMdwHome,
+    user                   => $user,
+    group                  => $group,    
+    downloadDir            => $downloadDir,
+    remoteFile             => hiera('wls_remote_file'),
+    puppetDownloadMntPoint => $puppetDownloadMntPoint,
+  }
+
+  Wls::Nodemanager {
+    wlHome       => $osWlHome,
+    fullJDKName  => $jdkWls11gJDK,  
+    user         => $user,
+    group        => $group,
+    serviceName  => $serviceName,  
+    downloadDir  => $downloadDir, 
+  }
+
+  Wls::Bsupatch {
+    mdwHome                => $osMdwHome,
+    wlHome                 => $osWlHome,
+    fullJDKName            => $jdkWls11gJDK,
+    user                   => $user,
+    group                  => $group,
+    downloadDir            => $downloadDir, 
+    puppetDownloadMntPoint => $puppetDownloadMntPoint, 
+  }
+
+  # install
+  wls::installwls{'11gPS5':
+     createUser   => false, 
+  }
+  
+  # weblogic patch
+  ##wls::bsupatch{'p17071663':
+  ##   patchId      => 'BYJ1',    
+  ##   patchFile    => 'p17071663_1036_Generic.zip',  
+  ##   require      => Wls::Installwls['11gPS5'],
+  ##}
+
+   #nodemanager configuration and starting
+  wls::nodemanager{'nodemanager11g':
+     listenPort    => hiera('domain_nodemanager_port'),
+     listenAddress => hiera('domain_node_address'),
+     logDir        => $logDir,
+  ##   require       => Wls::Bsupatch['p17071663'],
+  }
+   
+  orautils::nodemanagerautostart{"autostart ${wlsDomainName}":
+      version     => "1111",
+      wlHome      => $osWlHome, 
+      user        => $user,
+      logDir      => $logDir,
+      require     => Wls::Nodemanager['nodemanager11g'];
+  }
+
+}
+
+class copydomain {
+
+
+
+  $wlsDomainName   = hiera('domain_name')
+
+  $adminListenPort = hiera('domain_adminserver_port')
+  $nodemanagerPort = hiera('domain_nodemanager_port')
+  $address         = hiera('domain_adminserver_address')
+
+  $userConfigDir   = hiera('wls_user_config_dir')
+  $jdkWls11gJDK    = hiera('wls_jdk_version')
+                       
+  $osOracleHome = hiera('wls_oracle_base_home_dir')
+  $osMdwHome    = hiera('wls_middleware_home_dir')
+  $osWlHome     = hiera('wls_weblogic_home_dir')
+  $user         = hiera('wls_os_user')
+  $group        = hiera('wls_os_group')
+  $downloadDir  = hiera('wls_download_dir')
+  $logDir       = hiera('wls_log_dir')     
+
+  
+  # install domain
+  wls::copydomain{'copyWlsDomain':
+   version         => '1111',
+   wlHome          => $osWlHome,
+   mdwHome         => $osMdwHome,
+   fullJDKName     => $jdkWls11gJDK, 
+   domain          => $wlsDomainName,
+   adminListenAdr  => $address,
+   adminListenPort => $adminListenPort,
+   sshpass         => false,
+   wlsUser         => hiera('wls_weblogic_user'),
+   password        => hiera('domain_wls_password'),
+   user            => $user,
+   userPassword    => 'oracle',
+   group           => $group,
+   logDir          => $logDir,    
+   downloadDir     => $downloadDir, 
+  }
+
+}
+
+class maintenance {
+
+  $osOracleHome = hiera('wls_oracle_base_home_dir')
+  $osMdwHome    = hiera('wls_middleware_home_dir')
+  $osWlHome     = hiera('wls_weblogic_home_dir')
+  $user         = hiera('wls_os_user')
+  $group        = hiera('wls_os_group')
+  $downloadDir  = hiera('wls_download_dir')
+  $logDir       = hiera('wls_log_dir')     
+
+  $mtimeParam = "1"
+
+
+  cron { 'cleanwlstmp' :
+    command => "find /tmp -name '*.tmp' -mtime ${mtimeParam} -exec rm {} \\; >> /tmp/tmp_purge.log 2>&1",
+    user    => $user,
+    hour    => 06,
+    minute  => 25,
+  }
+
+  cron { 'mdwlogs' :
+    command => "find ${osMdwHome}/logs -name 'wlst_*.*' -mtime ${mtimeParam} -exec rm {} \\; >> /tmp/wlst_purge.log 2>&1",
+    user    => $user,
+    hour    => 06,
+    minute  => 30,
+  }
+
+}
+
+

+ 712 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/manifests/site.pp

@@ -0,0 +1,712 @@
+# test
+#
+# one machine setup with weblogic 10.3.6 with BSU
+# needs jdk7, orawls, orautils, fiddyspence-sysctl, erwbgy-limits puppet modules
+#
+
+node 'admin.example.com' {
+  
+   include os,java, ssh, orautils 
+   include wls1036
+   include wls1036_domain
+   include wls_application_Cluster
+   include wls_application_JMS
+   include maintenance
+   include packdomain
+   
+   Class['os']  -> 
+     Class['ssh']  -> 
+       Class['java']  -> 
+         Class['wls1036'] -> 
+           Class['wls1036_domain'] -> 
+             Class['wls_application_Cluster'] -> 
+               Class['wls_application_JMS'] ->
+                 Class['packdomain']
+}  
+
+# operating settings for Middleware
+class os {
+
+  notice "class os ${operatingsystem}"
+
+  $default_params = {}
+  $host_instances = hiera('hosts', [])
+  create_resources('host',$host_instances, $default_params)
+
+  exec { "create swap file":
+    command => "/bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=8192",
+    creates => "/var/swap.1",
+  }
+
+  exec { "attach swap file":
+    command => "/sbin/mkswap /var/swap.1 && /sbin/swapon /var/swap.1",
+    require => Exec["create swap file"],
+    unless => "/sbin/swapon -s | grep /var/swap.1",
+  }
+
+  #add swap file entry to fstab
+  exec {"add swapfile entry to fstab":
+    command => "/bin/echo >>/etc/fstab /var/swap.1 swap swap defaults 0 0",
+    require => Exec["attach swap file"],
+    user => root,
+    unless => "/bin/grep '^/var/swap.1' /etc/fstab 2>/dev/null",
+  }
+
+  service { iptables:
+        enable    => false,
+        ensure    => false,
+        hasstatus => true,
+  }
+
+  group { 'dba' :
+    ensure => present,
+  }
+
+  # http://raftaman.net/?p=1311 for generating password
+  # password = oracle
+  user { 'wls' :
+    ensure     => present,
+    groups     => 'dba',
+    shell      => '/bin/bash',
+    password   => '$1$DSJ51vh6$4XzzwyIOk6Bi/54kglGk3.',
+    home       => "/home/wls",
+    comment    => 'wls user created by Puppet',
+    managehome => true,
+    require    => Group['dba'],
+  }
+
+  $install = [ 'binutils.x86_64','unzip.x86_64']
+
+
+  package { $install:
+    ensure  => present,
+  }
+
+  class { 'limits':
+    config => {
+               '*'       => {  'nofile'  => { soft => '2048'   , hard => '8192',   },},
+               'wls'     => {  'nofile'  => { soft => '65536'  , hard => '65536',  },
+                               'nproc'   => { soft => '2048'   , hard => '16384',   },
+                               'memlock' => { soft => '1048576', hard => '1048576',},
+                               'stack'   => { soft => '10240'  ,},},
+               },
+    use_hiera => false,
+  }
+
+  sysctl { 'kernel.msgmnb':                 ensure => 'present', permanent => 'yes', value => '65536',}
+  sysctl { 'kernel.msgmax':                 ensure => 'present', permanent => 'yes', value => '65536',}
+  sysctl { 'kernel.shmmax':                 ensure => 'present', permanent => 'yes', value => '2588483584',}
+  sysctl { 'kernel.shmall':                 ensure => 'present', permanent => 'yes', value => '2097152',}
+  sysctl { 'fs.file-max':                   ensure => 'present', permanent => 'yes', value => '6815744',}
+  sysctl { 'net.ipv4.tcp_keepalive_time':   ensure => 'present', permanent => 'yes', value => '1800',}
+  sysctl { 'net.ipv4.tcp_keepalive_intvl':  ensure => 'present', permanent => 'yes', value => '30',}
+  sysctl { 'net.ipv4.tcp_keepalive_probes': ensure => 'present', permanent => 'yes', value => '5',}
+  sysctl { 'net.ipv4.tcp_fin_timeout':      ensure => 'present', permanent => 'yes', value => '30',}
+  sysctl { 'kernel.shmmni':                 ensure => 'present', permanent => 'yes', value => '4096', }
+  sysctl { 'fs.aio-max-nr':                 ensure => 'present', permanent => 'yes', value => '1048576',}
+  sysctl { 'kernel.sem':                    ensure => 'present', permanent => 'yes', value => '250 32000 100 128',}
+  sysctl { 'net.ipv4.ip_local_port_range':  ensure => 'present', permanent => 'yes', value => '9000 65500',}
+  sysctl { 'net.core.rmem_default':         ensure => 'present', permanent => 'yes', value => '262144',}
+  sysctl { 'net.core.rmem_max':             ensure => 'present', permanent => 'yes', value => '4194304', }
+  sysctl { 'net.core.wmem_default':         ensure => 'present', permanent => 'yes', value => '262144',}
+  sysctl { 'net.core.wmem_max':             ensure => 'present', permanent => 'yes', value => '1048576',}
+
+}
+
+class ssh {
+  require os
+
+  notice 'class ssh'
+
+  file { "/home/wls/.ssh/":
+    owner  => "wls",
+    group  => "dba",
+    mode   => "700",
+    ensure => "directory",
+    alias  => "wls-ssh-dir",
+  }
+  
+  file { "/home/wls/.ssh/id_rsa.pub":
+    ensure  => present,
+    owner   => "wls",
+    group   => "dba",
+    mode    => "644",
+    source  => "/vagrant/ssh/id_rsa.pub",
+    require => File["wls-ssh-dir"],
+  }
+  
+  file { "/home/wls/.ssh/id_rsa":
+    ensure  => present,
+    owner   => "wls",
+    group   => "dba",
+    mode    => "600",
+    source  => "/vagrant/ssh/id_rsa",
+    require => File["wls-ssh-dir"],
+  }
+  
+  file { "/home/wls/.ssh/authorized_keys":
+    ensure  => present,
+    owner   => "wls",
+    group   => "dba",
+    mode    => "644",
+    source  => "/vagrant/ssh/id_rsa.pub",
+    require => File["wls-ssh-dir"],
+  }        
+}
+
+class java {
+  require os
+
+  notice 'class java'
+
+  $remove = [ "java-1.7.0-openjdk.x86_64", "java-1.6.0-openjdk.x86_64" ]
+
+  package { $remove:
+    ensure  => absent,
+  }
+
+  include jdk7
+
+  jdk7::install7{ 'jdk1.7.0_181':
+      version              => "7u181" , 
+      fullVersion          => "jdk1.7.0_181",
+      alternativesPriority => 18000, 
+      x64                  => true,
+      downloadDir          => hiera('wls_download_dir'),
+      urandomJavaFix       => true,
+      sourcePath           => hiera('wls_source'),
+  }
+
+}
+
+class wls1036{
+
+   class { 'wls::urandomfix' :}
+
+   $jdkWls11gJDK  = hiera('wls_jdk_version')
+   $wls11gVersion = hiera('wls_version')
+                       
+   $puppetDownloadMntPoint = hiera('wls_source')                       
+ 
+   $osOracleHome = hiera('wls_oracle_base_home_dir')
+   $osMdwHome    = hiera('wls_middleware_home_dir')
+   $osWlHome     = hiera('wls_weblogic_home_dir')
+   $user         = hiera('wls_os_user')
+   $group        = hiera('wls_os_group')
+   $downloadDir  = hiera('wls_download_dir')
+   $logDir       = hiera('wls_log_dir')     
+
+  # set the defaults
+  Wls::Installwls {
+    version                => $wls11gVersion,
+    fullJDKName            => $jdkWls11gJDK,
+    oracleHome             => $osOracleHome,
+    mdwHome                => $osMdwHome,
+    user                   => $user,
+    group                  => $group,    
+    downloadDir            => $downloadDir,
+    remoteFile             => hiera('wls_remote_file'),
+    puppetDownloadMntPoint => $puppetDownloadMntPoint,
+  }
+
+  Wls::Nodemanager {
+    wlHome       => $osWlHome,
+    fullJDKName  => $jdkWls11gJDK,  
+    user         => $user,
+    group        => $group,
+    serviceName  => $serviceName,  
+    downloadDir  => $downloadDir, 
+  }
+
+  Wls::Bsupatch {
+    mdwHome                => $osMdwHome,
+    wlHome                 => $osWlHome,
+    fullJDKName            => $jdkWls11gJDK,
+    user                   => $user,
+    group                  => $group,
+    downloadDir            => $downloadDir, 
+    puppetDownloadMntPoint => $puppetDownloadMntPoint, 
+    remoteFile             => hiera('wls_remote_file'),
+  }
+
+  # install
+  wls::installwls{'11gPS5':
+     createUser   => false, 
+  }
+  
+  # weblogic patch
+  ##wls::bsupatch{'p17071663':
+  ##   ensure       => 'present',
+  ##   patchId      => 'BYJ1',    
+  ##   patchFile    => 'p17071663_1036_Generic.zip',  
+  ##   require      => Wls::Installwls['11gPS5'],
+  ##}
+
+   #nodemanager configuration and starting
+  wls::nodemanager{'nodemanager11g':
+     listenPort    => hiera('domain_nodemanager_port'),
+     listenAddress => hiera('domain_adminserver_address'),
+     logDir        => $logDir,
+  ##   require       => Wls::Bsupatch['p17071663'],
+  }
+   
+  orautils::nodemanagerautostart{"autostart ${wlsDomainName}":
+      version     => "1111",
+      wlHome      => $osWlHome, 
+      user        => $user,
+      logDir      => $logDir,
+      require     => Wls::Nodemanager['nodemanager11g'];
+  }
+
+}
+
+class wls1036_domain{
+
+
+  $wlsDomainName   = hiera('domain_name')
+  $wlsDomainsPath  = hiera('wls_domains_path_dir')
+  $osTemplate      = hiera('domain_template')
+
+  $adminListenPort = hiera('domain_adminserver_port')
+  $nodemanagerPort = hiera('domain_nodemanager_port')
+  $address         = hiera('domain_adminserver_address')
+
+  $userConfigDir   = hiera('wls_user_config_dir')
+  $jdkWls11gJDK    = hiera('wls_jdk_version')
+                       
+  $osOracleHome = hiera('wls_oracle_base_home_dir')
+  $osMdwHome    = hiera('wls_middleware_home_dir')
+  $osWlHome     = hiera('wls_weblogic_home_dir')
+  $user         = hiera('wls_os_user')
+  $group        = hiera('wls_os_group')
+  $downloadDir  = hiera('wls_download_dir')
+  $logDir       = hiera('wls_log_dir')     
+
+  # install SOA OSB domain
+  wls::wlsdomain{'Wls1036Domain':
+    wlHome          => $osWlHome,
+    mdwHome         => $osMdwHome,
+    fullJDKName     => $jdkWls11gJDK, 
+    wlsTemplate     => $osTemplate,
+    domain          => $wlsDomainName,
+    developmentMode => false,
+    adminServerName => hiera('domain_adminserver'),
+    adminListenAdr  => $address,
+    adminListenPort => $adminListenPort,
+    nodemanagerPort => $nodemanagerPort,
+    java_arguments  => { "ADM" => "-XX:PermSize=256m -XX:MaxPermSize=512m -Xms1024m -Xmx1024m" },
+    wlsUser         => hiera('wls_weblogic_user'),
+    password        => hiera('domain_wls_password'),
+    user            => $user,
+    group           => $group,    
+    logDir          => $logDir,
+    downloadDir     => $downloadDir, 
+    reposDbUrl      => $reposUrl,
+    reposPrefix     => $reposPrefix,
+    reposPassword   => $reposPassword,
+  }
+
+  # start AdminServers for configuration of WLS Domain
+  wls::wlscontrol{'startAdminServer':
+    wlsDomain     => $wlsDomainName,
+    wlsDomainPath => "${wlsDomainsPath}/${wlsDomainName}",
+    wlsServer     => "AdminServer",
+    action        => 'start',
+    wlHome        => $osWlHome,
+    fullJDKName   => $jdkWls11gJDK,  
+    wlsUser       => hiera('wls_weblogic_user'),
+    password      => hiera('domain_wls_password'),
+    address       => $address,
+    port          => $nodemanagerPort,
+    user          => $user,
+    group         => $group,
+    downloadDir   => $downloadDir,
+    logOutput     => true, 
+    require       => Wls::Wlsdomain['Wls1036Domain'],
+  }
+
+  # create keystores for automatic WLST login
+  wls::storeuserconfig{
+   'Wls1036Domain_keys':
+    wlHome        => $osWlHome,
+    fullJDKName   => $jdkWls11gJDK,
+    domain        => $wlsDomainName, 
+    address       => $address,
+    wlsUser       => hiera('wls_weblogic_user'),
+    password      => hiera('domain_wls_password'),
+    port          => $adminListenPort,
+    user          => $user,
+    group         => $group,
+    userConfigDir => $userConfigDir, 
+    downloadDir   => $downloadDir, 
+    require       => Wls::Wlscontrol['startAdminServer'],
+  }
+
+}
+
+class maintenance {
+
+  $osOracleHome = hiera('wls_oracle_base_home_dir')
+  $osMdwHome    = hiera('wls_middleware_home_dir')
+  $osWlHome     = hiera('wls_weblogic_home_dir')
+  $user         = hiera('wls_os_user')
+  $group        = hiera('wls_os_group')
+  $downloadDir  = hiera('wls_download_dir')
+  $logDir       = hiera('wls_log_dir')     
+
+  $mtimeParam = "1"
+
+
+  cron { 'cleanwlstmp' :
+    command => "find /tmp -name '*.tmp' -mtime ${mtimeParam} -exec rm {} \\; >> /tmp/tmp_purge.log 2>&1",
+    user    => $user,
+    hour    => 06,
+    minute  => 25,
+  }
+
+  cron { 'mdwlogs' :
+    command => "find ${osMdwHome}/logs -name 'wlst_*.*' -mtime ${mtimeParam} -exec rm {} \\; >> /tmp/wlst_purge.log 2>&1",
+    user    => $user,
+    hour    => 06,
+    minute  => 30,
+  }
+
+}
+
+class wls_application_Cluster {
+
+  $wlsDomainName   = hiera('domain_name')
+  $wlsDomainsPath  = hiera('wls_domains_path_dir')
+  $osTemplate      = hiera('domain_template')
+
+  $adminListenPort = hiera('domain_adminserver_port')
+  $nodemanagerPort = hiera('domain_nodemanager_port')
+  $address         = hiera('domain_adminserver_address')
+
+  $userConfigDir   = hiera('wls_user_config_dir')
+  $jdkWls11gJDK    = hiera('wls_jdk_version')
+                       
+  $osOracleHome = hiera('wls_oracle_base_home_dir')
+  $osMdwHome    = hiera('wls_middleware_home_dir')
+  $osWlHome     = hiera('wls_weblogic_home_dir')
+  $user         = hiera('wls_os_user')
+  $group        = hiera('wls_os_group')
+  $downloadDir  = hiera('wls_download_dir')
+  $logDir       = hiera('wls_log_dir')     
+  
+  $userConfigFile = "${userConfigDir}/${user}-${wlsDomainName}-WebLogicConfig.properties"
+  $userKeyFile    = "${userConfigDir}/${user}-${wlsDomainName}-WebLogicKey.properties"
+  
+  # default parameters for the wlst scripts
+  Wls::Wlstexec {
+    wlsDomain      => $wlsDomainName,
+    wlHome         => $osWlHome,
+    fullJDKName    => $jdkWls11gJDK,  
+    user           => $user,
+    group          => $group,
+    address        => $address,
+    userConfigFile => $userConfigFile,
+    userKeyFile    => $userKeyFile,
+    port           => $adminListenPort,
+    downloadDir    => $downloadDir,
+    logOutput      => false, 
+  }
+
+
+  # create machine
+  wls::wlstexec { 
+    'createMachineNode1':
+     wlstype       => "machine",
+     wlsObjectName => "node1",
+     script        => 'createMachine.py',
+     params        => ["machineName      = 'node1'",
+                       "machineDnsName   = '10.10.10.100'",
+                      ],
+  }
+
+  # create machine
+  wls::wlstexec { 
+    'createMachineNode2':
+     wlstype       => "machine",
+     wlsObjectName => "node2",
+     script        => 'createMachine.py',
+     params        => ["machineName      = 'node2'",
+                       "machineDnsName   = '10.10.10.200'",
+                      ],
+     require        => Wls::Wlstexec['createMachineNode1'],
+  }
+  
+  
+    # create managed server 1
+    wls::wlstexec { 
+      'createManagerServerWlsServer1':
+       wlstype       => "server",
+       wlsObjectName => "wlsServer1",
+       script        => 'createServer.py',
+       params        => ["javaArguments    = '-XX:PermSize=256m -XX:MaxPermSize=512m -Xms1024m -Xmx1024m -Dweblogic.Stdout=/data/logs/wlsServer1.out -Dweblogic.Stderr=/data/logs/wlsServer1_err.out'",
+                         "wlsServerName    = 'wlsServer1'",
+                         "machineName      = 'node1'",
+                         "listenPort       = 9201",
+                         "listenAddress    = '10.10.10.100'",
+                         "nodeMgrLogDir    = '/data/logs'",
+                        ],
+      require        => Wls::Wlstexec['createMachineNode2'],
+    }
+  
+    # create managed server 2
+    wls::wlstexec { 
+      'createManagerServerWlsServer2':
+       wlstype       => "server",
+       wlsObjectName => "wlsServer2",
+       script        => 'createServer.py',
+       params        => ["javaArguments    = '-XX:PermSize=256m -XX:MaxPermSize=512m -Xms1024m -Xmx1024m -Dweblogic.Stdout=/data/logs/wlsServer2.out -Dweblogic.Stderr=/data/logs/wlsServer2_err.out'",
+                         "wlsServerName    = 'wlsServer2'",
+                         "machineName      = 'node2'",
+                         "listenPort       = 9201",
+                         "listenAddress    = '10.10.10.200'",
+                         "nodeMgrLogDir    = '/data/logs'",
+                        ],
+      require        => Wls::Wlstexec['createManagerServerWlsServer1'],
+    }
+  
+    # create cluster
+    wls::wlstexec { 
+      'createClusterWeb':
+       wlstype       => "cluster",
+       wlsObjectName => "WebCluster",
+       script        => 'createCluster.py',
+       params        => ["clusterName      = 'WebCluster'",
+                         "clusterNodes     = 'wlsServer1,wlsServer2'",
+                        ],
+      require        => Wls::Wlstexec['createManagerServerWlsServer2'],
+    }
+
+
+
+}
+
+class wls_application_JMS{
+
+  $wlsDomainName   = hiera('domain_name')
+  $wlsDomainsPath  = hiera('wls_domains_path_dir')
+  $osTemplate      = hiera('domain_template')
+
+  $adminListenPort = hiera('domain_adminserver_port')
+  $nodemanagerPort = hiera('domain_nodemanager_port')
+  $address         = hiera('domain_adminserver_address')
+
+  $userConfigDir   = hiera('wls_user_config_dir')
+  $jdkWls11gJDK    = hiera('wls_jdk_version')
+                       
+  $osOracleHome = hiera('wls_oracle_base_home_dir')
+  $osMdwHome    = hiera('wls_middleware_home_dir')
+  $osWlHome     = hiera('wls_weblogic_home_dir')
+  $user         = hiera('wls_os_user')
+  $group        = hiera('wls_os_group')
+  $downloadDir  = hiera('wls_download_dir')
+  $logDir       = hiera('wls_log_dir')     
+  
+  $userConfigFile = "${userConfigDir}/${user}-${wlsDomainName}-WebLogicConfig.properties"
+  $userKeyFile    = "${userConfigDir}/${user}-${wlsDomainName}-WebLogicKey.properties"
+
+  # default parameters for the wlst scripts
+  Wls::Wlstexec {
+    wlsDomain      => $wlsDomainName,
+    wlHome         => $osWlHome,
+    fullJDKName    => $jdkWls11gJDK,  
+    user           => $user,
+    group          => $group,
+    address        => $address,
+    userConfigFile => $userConfigFile,
+    userKeyFile    => $userKeyFile,
+    port           => $adminListenPort,
+    downloadDir    => $downloadDir,
+    logOutput      => true, 
+  }
+  
+  # create jms server for wlsServer1 
+  wls::wlstexec { 
+    'createJmsServerServer1':
+     wlstype       => "jmsserver",
+     wlsObjectName => "jmsServer1",
+     script        => 'createJmsServer.py',
+     params        =>  ["serverTarget   = 'wlsServer1'",
+                        "jmsServerName  = 'jmsServer1'",
+                        ],
+  }
+  # create jms server for wlsServer2 
+  wls::wlstexec { 
+    'createJmsServerServer2':
+     wlstype       => "jmsserver",
+     wlsObjectName => "jmsServer2",
+     script        => 'createJmsServer.py',
+     params        =>  ["serverTarget   = 'wlsServer2'",
+                        "jmsServerName  = 'jmsServer2'",
+                       ],
+     require       => Wls::Wlstexec['createJmsServerServer1'];
+  }
+
+  # create jms module for WebCluster 
+  wls::wlstexec { 
+    'createJmsModuleServer':
+     wlstype       => "jmsmodule",
+     wlsObjectName => "jmsModule",
+     script        => 'createJmsModule.py',
+     params        =>  ["target         = 'WebCluster'",
+                        "jmsModuleName  = 'jmsModule'",
+                        "targetType     = 'Cluster'",
+                       ],
+     require       => Wls::Wlstexec['createJmsServerServer2'];
+  }
+
+  # create jms subdeployment for jms module 
+  wls::wlstexec { 
+    'createJmsSubDeploymentWLSforJmsModule':
+     wlstype       => "jmssubdeployment",
+     wlsObjectName => "jmsModule/JmsServer",
+     script        => 'createJmsSubDeployment.py',
+     params        => ["target         = 'jmsServer1,jmsServer2'",
+                       "jmsModuleName  = 'jmsModule'",
+                       "subName        = 'JmsServer'",
+                       "targetType     = 'JMSServer'"
+                      ],
+     require     => Wls::Wlstexec['createJmsModuleServer'];
+  }
+
+  # create jms connection factory for jms module 
+  wls::wlstexec { 
+    'createJmsConnectionFactoryforJmsModule':
+     wlstype       => "jmsobject",
+     wlsObjectName => "cf",
+     script        => 'createJmsConnectionFactory.py',
+     params        => ["jmsModuleName     = 'jmsModule'",
+                       "cfName            = 'cf'",
+                       "cfJNDIName        = 'jms/cf'",
+                       "transacted        = 'false'",
+                       "timeout           = 'xxxx'"
+                      ],
+     require     => Wls::Wlstexec['createJmsSubDeploymentWLSforJmsModule'];
+  }
+
+  # create jms error Queue for jms module 
+  wls::wlstexec { 
+    'createJmsErrorQueueforJmsModule':
+     wlstype       => "jmsobject",
+     wlsObjectName => "ErrorQueue",
+     script        => 'createJmsQueueOrTopic.py',
+     params        => ["subDeploymentName = 'JmsServer'",
+                       "jmsModuleName     = 'jmsModule'",
+                       "jmsName           = 'ErrorQueue'",
+                       "jmsJNDIName       = 'jms/ErrorQueue'",
+                       "jmsType           = 'queue'",
+                       "distributed       = 'true'",
+                       "balancingPolicy   = 'Round-Robin'",
+                       "useRedirect       = 'false'",
+                      ],
+     require     => Wls::Wlstexec['createJmsConnectionFactoryforJmsModule'];
+  }
+
+  # create jms Queue for jms module 
+  wls::wlstexec { 
+    'createJmsQueueforJmsModule':
+     wlstype       => "jmsobject",
+     wlsObjectName => "Queue1",
+     script        => 'createJmsQueueOrTopic.py',
+     params        => ["subDeploymentName   = 'JmsServer'",
+                       "jmsModuleName       = 'jmsModule'",
+                       "jmsName             = 'Queue1'",
+                       "jmsJNDIName         = 'jms/Queue1'",
+                       "jmsType             = 'queue'",
+                       "distributed         = 'true'",
+                       "balancingPolicy   = 'Round-Robin'",
+                       "useRedirect         = 'true'",
+                       "limit               = 3",
+                       "deliveryDelay       = 2000",
+                       "timeToLive          = 300000",
+                       "policy              = 'Redirect'",
+                       "errorObject         = 'ErrorQueue'"
+                      ],
+     require     => Wls::Wlstexec['createJmsErrorQueueforJmsModule'];
+  }
+
+  # create jms Topic for jms module 
+  wls::wlstexec { 
+    'createJmsTopicforJmsModule':
+     wlstype       => "jmsobject",
+     wlsObjectName => "Topic1",
+     script        => 'createJmsQueueOrTopic.py',
+     params        => ["subDeploymentName   = 'JmsServer'",
+                       "jmsModuleName       = 'jmsModule'",
+                       "jmsName             = 'Topic1'",
+                       "jmsJNDIName         = 'jms/Topic1'",
+                       "jmsType             = 'topic'",
+                       "distributed         = 'true'",
+                       "balancingPolicy     = 'Round-Robin'",
+                      ],
+     require     => Wls::Wlstexec['createJmsQueueforJmsModule'];
+  }
+
+  # create jms Queue for jms module 
+  wls::wlstexec { 
+    'createJmsQueue2forJmsModule':
+     wlstype       => "jmsobject",
+     wlsObjectName => "Queue2",
+     script        => 'createJmsQueueOrTopic.py',
+     params        => ["subDeploymentName   = 'JmsServer'",
+                       "jmsModuleName       = 'jmsModule'",
+                       "jmsName             = 'Queue2'",
+                       "jmsJNDIName         = 'jms/Queue2'",
+                       "jmsType             = 'queue'",
+                       "distributed         = 'true'",
+                       "balancingPolicy     = 'Round-Robin'",
+                       "useLogRedirect      = 'true'",
+                       "loggingPolicy       = '%header%,%properties%'",
+                       "limit               = 3",
+                       "deliveryDelay       = 2000",
+                       "timeToLive          = 300000",
+                      ],
+     require     => Wls::Wlstexec['createJmsTopicforJmsModule'];
+  }
+
+  # create jms Queue for jms module 
+  wls::wlstexec { 
+    'createJmsQueue3forJmsModule':
+     wlstype       => "jmsobject",
+     wlsObjectName => "Queue3",
+     script        => 'createJmsQueueOrTopic.py',
+     params        => ["subDeploymentName   = 'JmsServer'",
+                       "jmsModuleName       = 'jmsModule'",
+                       "jmsName             = 'Queue3'",
+                       "jmsJNDIName         = 'jms/Queue3'",
+                       "jmsType             = 'queue'",
+                       "distributed         = 'true'",
+                       "balancingPolicy     = 'Round-Robin'",
+                       "timeToLive          = 300000",
+                      ],
+     require     => Wls::Wlstexec['createJmsQueue2forJmsModule'];
+  }
+
+}
+
+class packdomain {
+
+  $wlsDomainName   = hiera('domain_name')
+  $jdkWls11gJDK    = hiera('wls_jdk_version')
+                       
+  $osMdwHome       = hiera('wls_middleware_home_dir')
+  $osWlHome        = hiera('wls_weblogic_home_dir')
+  $user            = hiera('wls_os_user')
+  $group           = hiera('wls_os_group')
+  $downloadDir     = hiera('wls_download_dir')
+
+  wls::packdomain{'packWlsDomain':
+      wlHome          => $osWlHome,
+      mdwHome         => $osMdwHome,
+      fullJDKName     => $jdkWls11gJDK,  
+      user            => $user,
+      group           => $group,    
+      downloadDir     => $downloadDir, 
+      domain          => $wlsDomainName,
+  }
+}
+

+ 10 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/jdk7/Gemfile

@@ -0,0 +1,10 @@
+source 'https://rubygems.org'
+
+puppetversion = ENV.key?('PUPPET_VERSION') ? "= #{ENV['PUPPET_VERSION']}" : ['>= 3.2']
+
+gem 'puppet-lint'
+gem 'puppet', puppetversion
+gem 'rspec-puppet', '~> 1.0.0'
+gem 'rspec-system-puppet'
+gem 'puppetlabs_spec_helper'
+gem 'puppet-syntax'

+ 201 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/jdk7/License

@@ -0,0 +1,201 @@
+                              Apache License
+                        Version 2.0, January 2004
+                     http://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+   "License" shall mean the terms and conditions for use, reproduction,
+   and distribution as defined by Sections 1 through 9 of this document.
+
+   "Licensor" shall mean the copyright owner or entity authorized by
+   the copyright owner that is granting the License.
+
+   "Legal Entity" shall mean the union of the acting entity and all
+   other entities that control, are controlled by, or are under common
+   control with that entity. For the purposes of this definition,
+   "control" means (i) the power, direct or indirect, to cause the
+   direction or management of such entity, whether by contract or
+   otherwise, or (ii) ownership of fifty percent (50%) or more of the
+   outstanding shares, or (iii) beneficial ownership of such entity.
+
+   "You" (or "Your") shall mean an individual or Legal Entity
+   exercising permissions granted by this License.
+
+   "Source" form shall mean the preferred form for making modifications,
+   including but not limited to software source code, documentation
+   source, and configuration files.
+
+   "Object" form shall mean any form resulting from mechanical
+   transformation or translation of a Source form, including but
+   not limited to compiled object code, generated documentation,
+   and conversions to other media types.
+
+   "Work" shall mean the work of authorship, whether in Source or
+   Object form, made available under the License, as indicated by a
+   copyright notice that is included in or attached to the work
+   (an example is provided in the Appendix below).
+
+   "Derivative Works" shall mean any work, whether in Source or Object
+   form, that is based on (or derived from) the Work and for which the
+   editorial revisions, annotations, elaborations, or other modifications
+   represent, as a whole, an original work of authorship. For the purposes
+   of this License, Derivative Works shall not include works that remain
+   separable from, or merely link (or bind by name) to the interfaces of,
+   the Work and Derivative Works thereof.
+
+   "Contribution" shall mean any work of authorship, including
+   the original version of the Work and any modifications or additions
+   to that Work or Derivative Works thereof, that is intentionally
+   submitted to Licensor for inclusion in the Work by the copyright owner
+   or by an individual or Legal Entity authorized to submit on behalf of
+   the copyright owner. For the purposes of this definition, "submitted"
+   means any form of electronic, verbal, or written communication sent
+   to the Licensor or its representatives, including but not limited to
+   communication on electronic mailing lists, source code control systems,
+   and issue tracking systems that are managed by, or on behalf of, the
+   Licensor for the purpose of discussing and improving the Work, but
+   excluding communication that is conspicuously marked or otherwise
+   designated in writing by the copyright owner as "Not a Contribution."
+
+   "Contributor" shall mean Licensor and any individual or Legal Entity
+   on behalf of whom a Contribution has been received by Licensor and
+   subsequently incorporated within the Work.
+
+2. Grant of Copyright License. Subject to the terms and conditions of
+   this License, each Contributor hereby grants to You a perpetual,
+   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+   copyright license to reproduce, prepare Derivative Works of,
+   publicly display, publicly perform, sublicense, and distribute the
+   Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of
+   this License, each Contributor hereby grants to You a perpetual,
+   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+   (except as stated in this section) patent license to make, have made,
+   use, offer to sell, sell, import, and otherwise transfer the Work,
+   where such license applies only to those patent claims licensable
+   by such Contributor that are necessarily infringed by their
+   Contribution(s) alone or by combination of their Contribution(s)
+   with the Work to which such Contribution(s) was submitted. If You
+   institute patent litigation against any entity (including a
+   cross-claim or counterclaim in a lawsuit) alleging that the Work
+   or a Contribution incorporated within the Work constitutes direct
+   or contributory patent infringement, then any patent licenses
+   granted to You under this License for that Work shall terminate
+   as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the
+   Work or Derivative Works thereof in any medium, with or without
+   modifications, and in Source or Object form, provided that You
+   meet the following conditions:
+
+   (a) You must give any other recipients of the Work or
+       Derivative Works a copy of this License; and
+
+   (b) You must cause any modified files to carry prominent notices
+       stating that You changed the files; and
+
+   (c) You must retain, in the Source form of any Derivative Works
+       that You distribute, all copyright, patent, trademark, and
+       attribution notices from the Source form of the Work,
+       excluding those notices that do not pertain to any part of
+       the Derivative Works; and
+
+   (d) If the Work includes a "NOTICE" text file as part of its
+       distribution, then any Derivative Works that You distribute must
+       include a readable copy of the attribution notices contained
+       within such NOTICE file, excluding those notices that do not
+       pertain to any part of the Derivative Works, in at least one
+       of the following places: within a NOTICE text file distributed
+       as part of the Derivative Works; within the Source form or
+       documentation, if provided along with the Derivative Works; or,
+       within a display generated by the Derivative Works, if and
+       wherever such third-party notices normally appear. The contents
+       of the NOTICE file are for informational purposes only and
+       do not modify the License. You may add Your own attribution
+       notices within Derivative Works that You distribute, alongside
+       or as an addendum to the NOTICE text from the Work, provided
+       that such additional attribution notices cannot be construed
+       as modifying the License.
+
+   You may add Your own copyright statement to Your modifications and
+   may provide additional or different license terms and conditions
+   for use, reproduction, or distribution of Your modifications, or
+   for any such Derivative Works as a whole, provided Your use,
+   reproduction, and distribution of the Work otherwise complies with
+   the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise,
+   any Contribution intentionally submitted for inclusion in the Work
+   by You to the Licensor shall be under the terms and conditions of
+   this License, without any additional terms or conditions.
+   Notwithstanding the above, nothing herein shall supersede or modify
+   the terms of any separate license agreement you may have executed
+   with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade
+   names, trademarks, service marks, or product names of the Licensor,
+   except as required for reasonable and customary use in describing the
+   origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or
+   agreed to in writing, Licensor provides the Work (and each
+   Contributor provides its Contributions) on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+   implied, including, without limitation, any warranties or conditions
+   of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+   PARTICULAR PURPOSE. You are solely responsible for determining the
+   appropriateness of using or redistributing the Work and assume any
+   risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory,
+   whether in tort (including negligence), contract, or otherwise,
+   unless required by applicable law (such as deliberate and grossly
+   negligent acts) or agreed to in writing, shall any Contributor be
+   liable to You for damages, including any direct, indirect, special,
+   incidental, or consequential damages of any character arising as a
+   result of this License or out of the use or inability to use the
+   Work (including but not limited to damages for loss of goodwill,
+   work stoppage, computer failure or malfunction, or any and all
+   other commercial damages or losses), even if such Contributor
+   has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing
+   the Work or Derivative Works thereof, You may choose to offer,
+   and charge a fee for, acceptance of support, warranty, indemnity,
+   or other liability obligations and/or rights consistent with this
+   License. However, in accepting such obligations, You may act only
+   on Your own behalf and on Your sole responsibility, not on behalf
+   of any other Contributor, and only if You agree to indemnify,
+   defend, and hold each Contributor harmless for any liability
+   incurred by, or claims asserted against, such Contributor by reason
+   of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
+
+APPENDIX: How to apply the Apache License to your work.
+
+   To apply the Apache License to your work, attach the following
+   boilerplate notice, with the fields enclosed by brackets "[]"
+   replaced with your own identifying information. (Don't include
+   the brackets!)  The text should be enclosed in the appropriate
+   comment syntax for the file format. We also recommend that a
+   file or class name and description of purpose be included on the
+   same "printed page" as the copyright notice for easier
+   identification within third-party archives.
+
+Copyright [yyyy] [name of copyright owner]
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.

+ 9 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/jdk7/Modulefile

@@ -0,0 +1,9 @@
+name 'biemond-jdk7'
+version '0.4.0'
+
+author 'Edwin Biemond'
+license 'Apache 2.0'
+project_page 'http://technology.amis.nl/2012/10/13/configure-fmw-servers-with-puppet/'
+source 'https://github.com/biemond/puppet/tree/master/modules/jdk7'
+summary 'Oracle JDK7 & JDK8 puppet module optimized for weblogic urandom rngd entropy'
+description 'Oracle JDK7 or JDK8 puppet module with low on entropy fix, you can use the rngd or rng-tools service or set urandom in Java'

+ 88 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/jdk7/README.md

@@ -0,0 +1,88 @@
+JDK JAVA SE 7, 8 puppet module
+============================== 
+[![Build Status](https://travis-ci.org/biemond/biemond-jdk7.png)](https://travis-ci.org/biemond/biemond-jdk7)
+
+
+Works with Puppet 2.7 or higher
+
+Should work for RedHat, CentOS, Ubuntu, Debian, Suse SLES or OracleLinux 
+
+Version updates
+---------------
+- 0.4.0 cryptography Extension (US export policy)
+- 0.3.9 JDK8 support and option to change the default java homes folder ( default = /usr/java ) 
+- 0.3.8 rsakeySizeFix parameter set true for weblogic 12.1.1 and jdk 1.7 >= version 40
+- 0.3.6 performance fix
+- 0.3.5 ruby escaped char warnings resolved
+- 0.3.4 bugfix on install folder, conflicts with others modules
+- 0.3.3 updated license to Apache 2.0
+- 0.3.2 sourceParam, alternativesPriority in install7 plus formatting
+- 0.3.1 Entropy fix for low on entropy, you can configure the rngd or rng-tools service or add it to java.security 
+- 0.2.1 added SLES as O.S. plus SED and alternatives fixes
+- 0.2 puppet 3.0 compatible, creates download folder
+
+
+installs only the java tar.gz files
+-----------------------------------
+this is because rpm post install fails with some pack error
+
+installs jdk on linux based systems with x64 or 32 bits   
+add the jdk-7u25-linux-x64.tar.gz (downloaded from Oracle website) to the files folder of this jdk7 module
+
+- download the tar.gz to the download folder of the puppet agent server
+- unpack the java tar.gz
+- set the java links in /usr/java ( latest and default ) 
+- set this java as default
+- optional updates urandom device for weblogic performance in java.security
+
+urandomfix class for lack of entropy this rngd or or rng-tools service add extra random number  
+
+example usage
+-------------
+
+	  include jdk7
+	
+	  jdk7::install7{ 'jdk1.7.0_40':
+	    version              => "7u40" , 
+	    fullVersion          => "jdk1.7.0_40",
+	    javaHomes            => '/usr/java/',
+	    alternativesPriority => 18000, 
+	    x64                  => true,
+	    downloadDir          => "/install",
+	    urandomJavaFix       => false,
+	    sourcePath           => "puppet:///modules/jdk7/"
+	  }
+
+or Java 8 and with rsa keySize Fix
+
+      jdk7::install7{ 'jdk1.8.0':
+        version              => "8" , 
+        fullVersion          => "jdk1.8.0",
+        alternativesPriority => 19000, 
+        x64                  => true,
+        downloadDir          => "/data/install",
+        urandomJavaFix       => true,
+        rsakeySizeFix        => false,
+        sourcePath           => "/software",
+      }
+
+or with cryptography Extension File US export
+
+	  jdk7::install7{ 'jdk1.7.0_51':
+	      version                   => "7u51" , 
+	      fullVersion               => "jdk1.7.0_51",
+	      alternativesPriority      => 18000, 
+	      x64                       => true,
+	      downloadDir               => "/data/install",
+	      urandomJavaFix            => true,
+	      rsakeySizeFix             => true,
+	      cryptographyExtensionFile => "UnlimitedJCEPolicyJDK7.zip",
+	      sourcePath                => "/software",
+	  }
+
+
+	  
+	  class { 'jdk7::urandomfix' :}
+  
+  
+ 

+ 40 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/jdk7/Rakefile

@@ -0,0 +1,40 @@
+require 'rubygems'
+require 'puppetlabs_spec_helper/rake_tasks'
+require 'puppet-lint/tasks/puppet-lint'
+require 'puppet-syntax/tasks/puppet-syntax'
+require 'pathname'
+
+
+
+PuppetLint.configuration.send("disable_80chars")
+# PuppetLint.configuration.send("disable_right_to_left_relationship")
+# PuppetLint.configuration.send("disable_autoloader_layout")
+# PuppetLint.configuration.send("disable_names_containing_dash")
+PuppetLint.configuration.send("disable_class_inherits_from_params_class")
+# PuppetLint.configuration.send("disable_parameter_order")
+# PuppetLint.configuration.send("disable_inherits_across_namespaces")
+# PuppetLint.configuration.send("disable_nested_classes_or_defines")
+PuppetLint.configuration.send("disable_variable_scope")
+# PuppetLint.configuration.send("disable_slash_comments")
+# PuppetLint.configuration.send("disable_star_comments")
+# PuppetLint.configuration.send("disable_selector_inside_resource")
+PuppetLint.configuration.send("disable_case_without_default")
+# PuppetLint.configuration.send("disable_documentation")
+PuppetLint.configuration.send("disable_double_quoted_strings")
+# PuppetLint.configuration.send("disable_only_variable_string")
+# PuppetLint.configuration.send("disable_variables_not_enclosed")
+# PuppetLint.configuration.send("disable_single_quote_string_with_variables")
+# PuppetLint.configuration.send("disable_quoted_booleans")
+#--no-puppet_url_without_modules
+# PuppetLint.configuration.send("disable_variable_contains_dash")
+# PuppetLint.configuration.send("disable_hard_tabs")
+PuppetLint.configuration.send("disable_trailing_whitespace")
+# PuppetLint.configuration.send("disable_2sp_soft_tabs")
+# PuppetLint.configuration.send("disable_arrow_alignment")
+# PuppetLint.configuration.send("disable_unquoted_resource_title")
+# PuppetLint.configuration.send("disable_ensure_first_param")
+# PuppetLint.configuration.send("disable_duplicate_params")
+# PuppetLint.configuration.send("disable_unquoted_file_mode")
+# PuppetLint.configuration.send("disable_file_mode")
+# PuppetLint.configuration.send("disable_ensure_not_symlink_target")
+#--no-unquoted_node_name

+ 6 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/jdk7/manifests/init.pp

@@ -0,0 +1,6 @@
+# = Class: jdk7
+#
+# This class installs Oracle JDK7
+#
+class jdk7() {
+}

+ 127 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/jdk7/manifests/install7.pp

@@ -0,0 +1,127 @@
+# jdk7::instal7
+#
+# On Linux low entropy can cause certain operations to be very slow.
+# Encryption operations need entropy to ensure randomness. Entropy is
+# generated by the OS when you use the keyboard, the mouse or the disk.
+#
+# If an encryption operation is missing entropy it will wait until
+# enough is generated.
+#
+# three options
+#  use rngd service (this class)
+#  set java.security in JDK ( jre/lib/security )
+#  set -Djava.security.egd=file:/dev/./urandom param
+#
+define jdk7::install7 (
+  $version                   = '7u51',
+  $fullVersion               = 'jdk1.7.0_51',
+  $javaHomes                 = '/usr/java',
+  $x64                       = true,
+  $alternativesPriority      = 17065,
+  $downloadDir               = '/install',
+  $cryptographyExtensionFile = undef,
+  $urandomJavaFix            = true,
+  $rsakeySizeFix             = false,  # set true for weblogic 12.1.1 and jdk 1.7 > version 40
+  $sourcePath                = "puppet:///modules/jdk7/",
+) {
+
+  if ( $x64 == true ) {
+    $type = 'x64'
+  } else {
+    $type = 'i586'
+  }
+
+  case $::kernel {
+    'Linux': {
+      $installVersion   = 'linux'
+      $installExtension = '.tar.gz'
+      $path             = '/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:'
+      $user             = 'root'
+      $group            = 'root'
+    }
+    default: {
+      fail("Unrecognized operating system ${::kernel}, please use it on a Linux host")
+    }
+  }
+  
+
+  $jdkfile = "jdk-${version}-${installVersion}-${type}${installExtension}"
+
+  # set the defaults for Exec
+  Exec {
+    path => $path,
+    user => $user,
+  }
+
+  # set the defaults for File
+  File {
+    replace => false,
+    owner   => $user,
+    group   => $group,
+    mode    => 0777,
+  }
+
+  exec { "create ${$downloadDir} directory":
+    command => "mkdir -p ${$downloadDir}",
+    unless  => "test -d ${$downloadDir}",
+  }
+
+  # check install folder
+  if !defined(File[$downloadDir]) {
+    file { $downloadDir:
+      ensure  => directory,
+      require => Exec["create ${$downloadDir} directory"],
+    }
+  }
+
+  # download jdk to client
+  file { "${downloadDir}/${jdkfile}":
+    ensure  => file,
+    source  => "${sourcePath}/${jdkfile}",
+    require => File[$downloadDir],
+  }
+
+  if ( $cryptographyExtensionFile != undef ) {
+    file { "${downloadDir}/${cryptographyExtensionFile}":
+      ensure  => file,
+      source  => "${sourcePath}/${cryptographyExtensionFile}",
+      require => File[$downloadDir],
+      before  => File["${downloadDir}/${jdkfile}"],
+    }
+  }
+
+
+  # install on client
+  jdk7::javaexec { "jdkexec ${title} ${version}":
+    path                      => $downloadDir,
+    fullVersion               => $fullVersion,
+    javaHomes                 => $javaHomes,    
+    jdkfile                   => $jdkfile,
+    cryptographyExtensionFile => $cryptographyExtensionFile,
+    alternativesPriority      => $alternativesPriority,
+    user                      => $user,
+    group                     => $group,
+    require                   => File["${downloadDir}/${jdkfile}"],
+  }
+
+  if ($urandomJavaFix == true) {
+    exec { "set urandom ${fullVersion}":
+      command => "sed -i -e's/securerandom.source=file:\\/dev\\/urandom/securerandom.source=file:\\/dev\\/.\\/urandom/g' ${javaHomes}/${fullVersion}/jre/lib/security/java.security",
+      unless  => "grep '^securerandom.source=file:/dev/./urandom' ${javaHomes}/${fullVersion}/jre/lib/security/java.security",
+      require => Javaexec["jdkexec ${title} ${version}"],
+    }
+  }
+  if ($rsakeySizeFix == true) {
+    exec { "sleep 3 sec for urandomJavaFix ${fullVersion}":
+      command => "/bin/sleep 3",
+      unless  => "grep 'RSA keySize < 512' ${javaHomes}/${fullVersion}/jre/lib/security/java.security",
+      require => Javaexec["jdkexec ${title} ${version}"],
+    }   
+    exec { "set RSA keySize ${fullVersion}":
+      command     => "sed -i -e's/RSA keySize < 1024/RSA keySize < 512/g' ${javaHomes}/${fullVersion}/jre/lib/security/java.security",
+      unless      => "grep 'RSA keySize < 512' ${javaHomes}/${fullVersion}/jre/lib/security/java.security",
+      subscribe   => Exec["sleep 3 sec for urandomJavaFix ${fullVersion}"],
+      refreshonly => true,
+    }
+  }    
+}

+ 108 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/jdk7/manifests/javaexec.pp

@@ -0,0 +1,108 @@
+# jdk7::javaexec
+#
+# unpack the java tar.gz
+# set the default java links
+# set this java as default
+#
+define jdk7::javaexec (
+  $path                      = undef,
+  $fullVersion               = undef,
+  $javaHomes                 = undef,
+  $jdkfile                   = undef,
+  $cryptographyExtensionFile = undef,
+  $alternativesPriority      = undef,
+  $user                      = undef,
+  $group                     = undef,
+) {
+
+  # set the Exec defaults
+  Exec {
+    path      => "/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:",
+    logoutput => true,
+    user      => $user,
+    group     => $group,
+  }
+
+  # set the defaults for File
+  File {
+    replace => false,
+    owner   => $user,
+    group   => $group,
+    mode    => 0755,
+  }
+
+  # check java install folder
+  if ! defined(File['/usr/java']) {
+    file { '/usr/java' :
+      ensure  => directory,
+    }
+  }
+
+  # check java install folder
+  if ! defined(File[$javaHomes]) {
+    file { $javaHomes :
+      ensure  => directory,
+    }
+  }
+
+  # extract gz file in /usr/java
+  exec { "extract java ${fullVersion}":
+    cwd     => $javaHomes,
+    command => "tar -xzf ${path}/${jdkfile}",
+    creates => "${javaHomes}/${fullVersion}",
+    require => File[$javaHomes],
+  }
+
+  # extract gz file in /usr/java
+  if ( $cryptographyExtensionFile != undef ) {
+    exec { "extract jce ${fullVersion}":
+      cwd     => "${javaHomes}/${fullVersion}/jre/lib/security",
+      command => "tar -xzf ${path}/${cryptographyExtensionFile}",
+      creates => "${javaHomes}/${fullVersion}/jre/lib/security/US_export_policy.jar",
+      require => [File[$javaHomes],Exec["extract java ${fullVersion}"]],
+      before  => Exec["chown -R root:root ${javaHomes}/${fullVersion}"],  
+    }
+  }
+
+  # set permissions
+  exec { "chown -R root:root ${javaHomes}/${fullVersion}":
+    unless  => "ls -al ${javaHomes}/${fullVersion}/bin/java | awk ' { print \$3 }' |  grep  root",
+    require => Exec["extract java ${fullVersion}"],
+  }
+
+  # java link to latest
+  file { '/usr/java/latest':
+    ensure  => link,
+    target  => "${javaHomes}/${fullVersion}",
+    require => Exec["extract java ${fullVersion}"],
+  }
+
+  # java link to default
+  file { '/usr/java/default':
+    ensure  => link,
+    target  => "/usr/java/latest",
+    require => File['/usr/java/latest'],
+  }
+
+  case $osfamily {
+    'RedHat': {
+      # set the java default
+      exec { "default java alternatives ${fullVersion}":
+        command => "alternatives --install /usr/bin/java java ${javaHomes}/${fullVersion}/bin/java ${alternativesPriority}",
+        require => File['/usr/java/default'],
+        unless  => "alternatives --display java | /bin/grep ${fullVersion}",
+      }
+    }
+    'Debian', 'Suse':{
+      # set the java default
+      exec { "default java alternatives ${fullVersion}":
+        command => "update-alternatives --install /usr/bin/java java ${javaHomes}/${fullVersion}/bin/java ${alternativesPriority}",
+        require => File['/usr/java/default'],
+        unless  => "update-alternatives --list java | /bin/grep ${fullVersion}",
+      }
+    }
+    default: {
+      fail("Unrecognized osfamily ${::osfamily}, please use it on a Linux host")
+    }
+  }
+}

+ 72 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/jdk7/manifests/urandomfix.pp

@@ -0,0 +1,72 @@
+# jdk7::urandomfix
+#
+# On Linux low entropy can cause certain operations to be very slow.
+# Encryption operations need entropy to ensure randomness. Entropy is
+# generated by the OS when you use the keyboard, the mouse or the disk.
+#
+# If an encryption operation is missing entropy it will wait until
+# enough is generated.
+#
+# three options
+#  use rngd service (this class)
+#  set java.security in JDK ( jre/lib/security )
+#  set -Djava.security.egd=file:/dev/./urandom param
+#
+class jdk7::urandomfix () {
+
+  case $::kernel {
+    'Linux': { $path = '/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:' }
+    default : { fail("Unrecognized operating system") }
+  }
+
+  # set the Exec defaults
+  Exec {
+    path      => $path,
+    logoutput => true,
+    user      => 'root',
+  }
+
+  package { "rng-tools": ensure => present, }
+
+  case $osfamily {
+    'RedHat': {
+      exec { "set urandom /etc/sysconfig/rngd":
+        command => "sed -i -e's/EXTRAOPTIONS=\"\"/EXTRAOPTIONS=\"-r \\/dev\\/urandom -o \\/dev\\/random -b\"/g' /etc/sysconfig/rngd",
+        unless  => "/bin/grep '^EXTRAOPTIONS=\"-r /dev/urandom -o /dev/random -b\"' /etc/sysconfig/rngd",
+        require => Package["rng-tools"],
+      }
+
+      service { "start rngd service":
+        ensure  => true,
+        name    => "rngd",
+        enable  => true,
+        require => Exec["set urandom /etc/sysconfig/rngd"],
+      }
+
+      exec { "chkconfig rngd":
+        command => "chkconfig --add rngd",
+        require => Service["start rngd service"],
+        unless  => "chkconfig | /bin/grep 'rngd'",
+      }
+
+    }
+    'Debian','Suse' : {
+      exec { "set urandom /etc/default/rng-tools":
+        command => "sed -i -e's/#HRNGDEVICE=\\/dev\\/null/HRNGDEVICE=\\/dev\\/urandom/g' /etc/default/rng-tools",
+        unless  => "/bin/grep '^HRNGDEVICE=/dev/urandom' /etc/default/rng-tools",
+        require => Package["rng-tools"],
+      }
+
+      service { "start rng-tools service":
+        ensure  => true,
+        name    => "rng-tools",
+        enable  => true,
+        require => Exec["set urandom /etc/default/rng-tools"],
+      }
+    }
+    default: {
+      fail("Unrecognized osfamily ${::osfamily}, please use it on a Linux host")
+    }
+    
+  }
+}

+ 13 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/jdk7/metadata.json

@@ -0,0 +1,13 @@
+{
+  "name": "biemond-jdk7",
+  "version": "0.3.6",
+  "summary": "Oracle JDK7 puppet module optimized for weblogic urandom rngd entropy",
+  "author": "Edwin Biemond",
+  "description": "Oracle JDK7 puppet module with low on entropy fix, you can use the rngd or rng-tools service or set urandom in Java",
+  "dependencies": [],
+  "types": [],
+  "checksums": {},
+  "source": "https://github.com/biemond/puppet/tree/master/modules/jdk7",
+  "project_page": "http://technology.amis.nl/2012/10/13/configure-fmw-servers-with-puppet/",
+  "license": "Apache 2.0"
+}

+ 72 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/jdk7/spec/classes/urandomfix_spec.rb

@@ -0,0 +1,72 @@
+require 'spec_helper'
+
+describe 'jdk7::urandomfix' , :type => :class do
+
+  it { should contain_package('rng-tools').with_ensure('present') }
+
+  describe "Windows" do
+    let(:facts) {{ :kernel          => 'Windows',
+                   :operatingsystem => 'Windows'}}
+    it do
+      expect { should contain_exec("set urandom /etc/sysconfig/rngd")
+             }.to raise_error(Puppet::Error, /Unrecognized operating system/)
+    end       
+  end
+  describe "SunOS" do
+    let(:facts) {{ :kernel          => 'SunOS',
+                   :operatingsystem => 'Solaris'}}
+    it do
+      expect { should contain_exec("set urandom /etc/sysconfig/rngd")
+             }.to raise_error(Puppet::Error, /Unrecognized operating system/)
+    end       
+  end
+
+  describe "CentOS" do
+    let(:facts) {{ :operatingsystem => 'CentOS' ,
+                   :kernel          => 'Linux',
+                   :osfamily        => 'RedHat' }}
+    
+    describe "on operatingsystem CentOS" do
+      it do 
+        should contain_exec("set urandom /etc/sysconfig/rngd").with({
+            'user'  => 'root',
+          })    
+      end
+      it do
+        should contain_service("start rngd service").with({
+            'ensure'     => true,
+            'enable'     => true,
+          })
+      end
+      it do 
+        should contain_exec("chkconfig rngd").with({
+            'user'    => 'root',
+            'command' => "chkconfig --add rngd",
+          })    
+      end
+    end
+
+  end
+
+
+  ['Ubuntu','Debian','SLES'].each do |system|
+    let(:facts) {{ :operatingsystem => system , 
+                   :kernel          => 'Linux',
+                   :osfamily        => 'Debian' }}
+
+    describe "on operatingsystem #{system}" do
+      it do 
+        should contain_exec("set urandom /etc/default/rng-tools").with({
+            'user'  => 'root',
+          })
+      end
+      it do
+        should contain_service("start rng-tools service").with({
+            'ensure'     => true,
+            'enable'     => true,
+          })
+      end
+    end
+  end
+
+end

+ 6 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/jdk7/spec/spec.opts

@@ -0,0 +1,6 @@
+--format
+s
+--colour
+--loadby
+mtime
+--backtrace

+ 2 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/jdk7/spec/spec_helper.rb

@@ -0,0 +1,2 @@
+require 'rubygems'
+require 'puppetlabs_spec_helper/module_spec_helper'

+ 4 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/limits/Changelog

@@ -0,0 +1,4 @@
+0.3.0
+
+* Enable muliple entries to be set for the same domain (user, group, everyone)
+  - for example both nofile and nproc for a group.

+ 6 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/limits/Modulefile

@@ -0,0 +1,6 @@
+name    'erwbgy-limits'
+version '0.3.1'
+author 'erwbgy'
+license 'Apache License, Version 2.0'
+summary 'Manage entries in /etc/security/limits.conf'
+project_page 'https://github.com/erwbgy/puppet-limits'

+ 84 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/limits/README.md

@@ -0,0 +1,84 @@
+# puppet-limits
+
+Puppet module to set entries in /etc/security/limits.conf
+
+## limits
+
+The recommended usage is to place the configuration under a limits hash in
+hiera and just include the limits module in your puppet configuration:
+
+    include limits
+
+Example hiera config:
+
+    limits:
+      '*':
+        nofile:
+          soft: '2048'
+          hard: '8192'
+        nproc:
+          soft: '20'
+          hard: '20'
+      'myuser':
+        nofile:
+          soft: '4068'
+          hard: '8192'
+      '@mygroup':
+        nproc:
+          hard: '50'
+      
+This example creates the following entries in /etc/security/limits.conf:
+
+    * nofile soft 2048
+    * nofile hard 8192
+    myuser nofile soft 4068
+    myuser nofile hard 8192
+    * nproc soft 20
+    * nproc hard 20
+    @mygroup nproc hard 50
+
+replacing any existing items in the same domain.
+
+You can also call it as a parameterised class passing in the configuration data as a hash - for example:
+
+    class { 'limits':
+      config => {
+        '*' => {
+          'nofile' => {
+            soft => '2048',
+            hard => '8192',
+          },
+          'nproc' => {
+            soft => '20',
+            hard => '20',
+          },
+        },
+        '@mygroup' => {
+          'nproc' => {
+            hard => '50',
+          }
+        },
+      },
+      use_hiera => false,
+    }
+
+### Parameters
+
+Each entry title is the domain name - for example '*' for all users, '@wheel'
+for members of the wheel group, 'root' for the root user etc.
+
+For each domain there is one or more items: one of: 'core', 'data', 'fsize',
+'memlock', 'nofile', 'rss', 'stack', 'cpu', 'nproc', 'as', 'maxlogins',
+'maxsyslogins', 'priority', 'locks', 'sigpending', 'msqqueue', 'nice',
+'rtprio'. 
+
+For each item the following parameters are accepted:
+
+   * *soft*: the item's soft limit. Optional.
+
+   * *hard*: the item's hard limit. Optional.
+
+See the limits.conf(5) man page for more information.
+
+Implementation based on https://projects.puppetlabs.com/projects/puppet/wiki/Puppet_Augeas
+

+ 2 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/limits/Rakefile

@@ -0,0 +1,2 @@
+require 'rubygems'
+require 'puppetlabs_spec_helper/rake_tasks'

+ 15 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/limits/example.yaml

@@ -0,0 +1,15 @@
+limits:
+  '*':
+    nofile:
+      soft: '2048'
+      hard: '4196'
+    nproc:
+      soft: '20'
+      hard: '20'
+  'myuser':
+    nofile:
+      soft: '4068'
+      hard: '8192'
+  '@mygroup':
+    nproc:
+      hard: '50'

+ 202 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/limits/manifests/domain.pp

@@ -0,0 +1,202 @@
+define limits::domain (
+  $as           = undef,
+  $core         = undef,
+  $cpu          = undef,
+  $data         = undef,
+  $fsize        = undef,
+  $locks        = undef,
+  $maxlogins    = undef,
+  $maxsyslogins = undef,
+  $memlock      = undef,
+  $msgqueue     = undef,
+  $nice         = undef,
+  $nofile       = undef,
+  $nproc        = undef,
+  $priority     = undef,
+  $rss          = undef,
+  $rtprio       = undef,
+  $sigpending   = undef,
+  $stack        = undef,
+) {
+  $domain = $title
+
+  # core: limits the core file size (KB)
+  if $core {
+    limits::set{ "${domain}-core":
+      domain => $domain,
+      item   => 'core',
+      soft   => $core[soft],
+      hard   => $core[hard],
+    }
+  }
+
+  # data: maximum data size (KB)
+  if $data {
+    limits::set{ "${domain}-data":
+      domain => $domain,
+      item   => 'data',
+      soft   => $data[soft],
+      hard   => $data[hard],
+    }
+  }
+
+  # fsize: maximum filesize (KB)
+  if $fsize {
+    limits::set{ "${domain}-fsize":
+      domain => $domain,
+      item   => 'fsize',
+      soft   => $fsize[soft],
+      hard   => $fsize[hard],
+    }
+  }
+
+  # memlock: maximum locked-in-memory address space (KB)
+  if $memlock {
+    limits::set{ "${domain}-memlock":
+      domain => $domain,
+      item   => 'memlock',
+      soft   => $memlock[soft],
+      hard   => $memlock[hard],
+    }
+  }
+
+  # nofile: maximum number of open files
+  if $nofile {
+    limits::set{ "${domain}-nofile":
+      domain => $domain,
+      item   => 'nofile',
+      soft   => $nofile[soft],
+      hard   => $nofile[hard],
+    }
+  }
+
+  # rss: maximum resident set size (KB) (Ignored in Linux 2.4.30 and higher)
+  if $rss {
+    limits::set{ "${domain}-rss":
+      domain => $domain,
+      item   => 'rss',
+      soft   => $rss[soft],
+      hard   => $rss[hard],
+    }
+  }
+
+  # stack: maximum stack size (KB)
+  if $stack {
+    limits::set{ "${domain}-stack":
+      domain => $domain,
+      item   => 'stack',
+      soft   => $stack[soft],
+      hard   => $stack[hard],
+    }
+  }
+
+  # cpu: maximum CPU time (minutes)
+  if $cpu {
+    limits::set{ "${domain}-cpu":
+      domain => $domain,
+      item   => 'cpu',
+      soft   => $cpu[soft],
+      hard   => $cpu[hard],
+    }
+  }
+
+  # nproc: maximum number of processes
+  if $nproc {
+    limits::set{ "${domain}-nproc":
+      domain => $domain,
+      item   => 'nproc',
+      soft   => $nproc[soft],
+      hard   => $nproc[hard],
+    }
+  }
+
+  # as: address space limit (KB)
+  if $as {
+    limits::set{ "${domain}-as":
+      domain => $domain,
+      item   => 'as',
+      soft   => $as[soft],
+      hard   => $as[hard],
+    }
+  }
+
+  # maxlogins: maximum number of logins for this user except for this with uid=0
+  if $maxlogins {
+    limits::set{ "${domain}-maxlogins":
+      domain => $domain,
+      item   => 'maxlogins',
+      soft   => $maxlogins[soft],
+      hard   => $maxlogins[hard],
+    }
+  }
+
+  # maxsyslogins: maximum number of all logins on system
+  if $maxsyslogins {
+    limits::set{ "${domain}-maxsyslogins":
+      domain => $domain,
+      item   => 'maxsyslogins',
+      soft   => $maxsyslogins[soft],
+      hard   => $maxsyslogins[hard],
+    }
+  }
+
+  # priority: the priority to run user process with (negative values boost process priority)
+  if $priority {
+    limits::set{ "${domain}-priority":
+      domain => $domain,
+      item   => 'priority',
+      soft   => $priority[soft],
+      hard   => $priority[hard],
+    }
+  }
+
+  # locks: maximum locked files (Linux 2.4 and higher)
+  if $locks {
+    limits::set{ "${domain}-locks":
+      domain => $domain,
+      item   => 'locks',
+      soft   => $locks[soft],
+      hard   => $locks[hard],
+    }
+  }
+
+  # sigpending: maximum number of pending signals (Linux 2.6 and higher)
+  if $sigpending {
+    limits::set{ "${domain}-sigpending":
+      domain => $domain,
+      item   => 'sigpending',
+      soft   => $sigpending[soft],
+      hard   => $sigpending[hard],
+    }
+  }
+
+  # msgqueue: maximum memory used by POSIX message queues (bytes) (Linux 2.6 and higher)
+  if $msgqueue {
+    limits::set{ "${domain}-msgqueue":
+      domain => $domain,
+      item   => 'msgqueue',
+      soft   => $msgqueue[soft],
+      hard   => $msgqueue[hard],
+    }
+  }
+
+  # nice: maximum nice priority allowed to raise to (Linux 2.6.12 and higher) values: [-20,19]
+  if $nice {
+    limits::set{ "${domain}-nice":
+      domain => $domain,
+      item   => 'nice',
+      soft   => $nice[soft],
+      hard   => $nice[hard],
+    }
+  }
+
+  # rtprio: maximum realtime priority allowed for non-privileged processes (Linux 2.6.12 and higher)
+  if $rtprio {
+    limits::set{ "${domain}-rtprio":
+      domain => $domain,
+      item   => 'rtprio',
+      soft   => $rtprio[soft],
+      hard   => $rtprio[hard],
+    }
+  }
+}

+ 67 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/limits/manifests/entry.pp

@@ -0,0 +1,67 @@
+# From: https://projects.puppetlabs.com/projects/puppet/wiki/Puppet_Augeas
+# Changes:
+# - modified match to use 'size == 0' rather than 'size != 1'
+# - avoid nested define
+#
+# Example:
+#  limits::entry { 'wso2esb':
+#    domain => "@mygroup",
+#    type   => 'soft',
+#    item   => 'nofile',
+#    value  => '4096'
+#  }
+define limits::entry (
+  $domain,
+  $type,
+  $item,
+  $value
+) {
+  case $item {
+    'core': {}
+    'data': {}
+    'fsize': {}
+    'memlock': {}
+    'nofile': {}
+    'rss': {}
+    'stack': {}
+    'cpu': {}
+    'nproc': {}
+    'as': {}
+    'maxlogins': {}
+    'maxsyslogins': {}
+    'priority': {}
+    'locks': {}
+    'sigpending': {}
+    'msqqueue': {}
+    'nice': {}
+    'rtprio': {}
+    default: {
+      warning("Unknown item '$item' so you may get augeas errors - see the limits.conf man page for valid values")
+    }
+  }
+
+  # guid of this entry
+  $key = "${domain}/${type}/${item}"
+
+  # augtool> match /files/etc/security/limits.conf/domain[.="root"][./type="hard" and ./item="nofile" and ./value="10000"]
+
+  $context = '/files/etc/security/limits.conf'
+
+  $path_list  = "domain[.=\"${domain}\"][./type=\"${type}\" and ./item=\"${item}\"]"
+  $path_exact = "domain[.=\"${domain}\"][./type=\"${type}\" and ./item=\"${item}\" and ./value=\"${value}\"]"
+
+  augeas { "limits_conf/${key}":
+    context => $context,
+    onlyif  => "match ${path_exact} size == 0",
+    changes => [
+      # remove all matching to the ${domain}, ${type}, ${item}, for any ${value}
+      "rm ${path_list}",
+      # insert new node at the end of tree
+      "set domain[last()+1] ${domain}",
+      # assign values to the new node
+      "set domain[last()]/type ${type}",
+      "set domain[last()]/item ${item}",
+      "set domain[last()]/value ${value}",
+    ],
+  }
+}

+ 14 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/limits/manifests/init.pp

@@ -0,0 +1,14 @@
+class limits (
+  $config    = undef,
+  $use_hiera = true
+) {
+  if $use_hiera {
+    $limits = hiera_hash('limits', $config)
+  }
+  else {
+    $limits = $config
+  }
+  if $limits {
+    create_resources( 'limits::domain', $limits )
+  }
+}

+ 23 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/limits/manifests/set.pp

@@ -0,0 +1,23 @@
+define limits::set (
+  $domain,
+  $item,
+  $soft = undef,
+  $hard = undef
+) {
+  if $soft {
+    limits::entry { "${domain}-soft-${item}":
+      domain => $domain,
+      type   => 'soft',
+      item   => $item,
+      value  => $soft,
+    }
+  }
+  if $hard {
+    limits::entry { "${domain}-hard-${item}":
+      domain => $domain,
+      type   => 'hard',
+      item   => $item,
+      value  => $hard,
+    }
+  }
+}

+ 28 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/limits/metadata.json

@@ -0,0 +1,28 @@
+{
+  "author": "erwbgy",
+  "dependencies": [
+
+  ],
+  "types": [
+
+  ],
+  "source": "UNKNOWN",
+  "project_page": "https://github.com/erwbgy/puppet-limits",
+  "license": "Apache License, Version 2.0",
+  "version": "0.3.1",
+  "checksums": {
+    "Changelog": "abddd120364266f0fc1aad979d9753c8",
+    "example.yaml": "f769a567dbcb7a48b18b5ca5e45353bb",
+    "manifests/entry.pp": "0f4fd83644e02503f6089285402b6184",
+    "Rakefile": "f37e6131fe7de9a49b09d31596f5fbf1",
+    "manifests/domain.pp": "d95f310bbfab6a95208febb1c2db0fe7",
+    "spec/spec_helper.rb": "3ea886dd135e120afa31e0aab12e85b0",
+    "manifests/init.pp": "64a069cbe37bb0992dd6a96060343af2",
+    "Modulefile": "10ecf0aff6984273ac44a257298ad981",
+    "manifests/set.pp": "1c1dd9b4af749c60018c0edb24a414bd",
+    "README.md": "8b0a96997f09737742e0bd050a8e9d64"
+  },
+  "description": "UNKNOWN",
+  "name": "erwbgy-limits",
+  "summary": "Manage entries in /etc/security/limits.conf"
+}

+ 2 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/limits/spec/spec_helper.rb

@@ -0,0 +1,2 @@
+require 'rubygems'
+require 'puppetlabs_spec_helper/module_spec_helper'

+ 10 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/orautils/Gemfile

@@ -0,0 +1,10 @@
+source 'https://rubygems.org'
+
+puppetversion = ENV.key?('PUPPET_VERSION') ? "= #{ENV['PUPPET_VERSION']}" : ['>= 3.2']
+
+gem 'puppet-lint'
+gem 'puppet', puppetversion
+gem 'rspec-puppet', '~> 1.0.0'
+gem 'rspec-system-puppet'
+gem 'puppetlabs_spec_helper'
+gem 'puppet-syntax'

+ 93 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/orautils/Gemfile.lock

@@ -0,0 +1,93 @@
+GEM
+  remote: https://rubygems.org/
+  specs:
+    builder (3.2.2)
+    diff-lcs (1.2.5)
+    excon (0.33.0)
+    facter (2.0.1)
+    fog (1.22.0)
+      fog-brightbox
+      fog-core (~> 1.21, >= 1.21.1)
+      fog-json
+      nokogiri (~> 1.5, >= 1.5.11)
+    fog-brightbox (0.0.2)
+      fog-core
+      fog-json
+    fog-core (1.22.0)
+      builder
+      excon (~> 0.33)
+      formatador (~> 0.2)
+      mime-types
+      net-scp (~> 1.1)
+      net-ssh (>= 2.1.3)
+    fog-json (1.0.0)
+      multi_json (~> 1.0)
+    formatador (0.2.4)
+    hiera (1.3.2)
+      json_pure
+    json_pure (1.8.1)
+    kwalify (0.7.2)
+    metaclass (0.0.4)
+    mime-types (1.25.1)
+    mocha (1.0.0)
+      metaclass (~> 0.0.1)
+    multi_json (1.9.3)
+    net-scp (1.2.1)
+      net-ssh (>= 2.6.5)
+    net-ssh (2.9.0)
+    nokogiri (1.5.11)
+    puppet (3.5.1)
+      facter (> 1.6, < 3)
+      hiera (~> 1.0)
+      json_pure
+      rgen (~> 0.6.5)
+    puppet-lint (0.3.2)
+    puppet-syntax (1.2.0)
+      puppet (>= 2.7.0)
+      rake
+    puppetlabs_spec_helper (0.4.1)
+      mocha (>= 0.10.5)
+      rake
+      rspec (>= 2.9.0)
+      rspec-puppet (>= 0.1.1)
+    rake (10.3.1)
+    rbvmomi (1.8.1)
+      builder
+      nokogiri (>= 1.4.1)
+      trollop
+    rgen (0.6.6)
+    rspec (2.14.1)
+      rspec-core (~> 2.14.0)
+      rspec-expectations (~> 2.14.0)
+      rspec-mocks (~> 2.14.0)
+    rspec-core (2.14.8)
+    rspec-expectations (2.14.5)
+      diff-lcs (>= 1.1.3, < 2.0)
+    rspec-mocks (2.14.6)
+    rspec-puppet (1.0.1)
+      rspec
+    rspec-system (2.8.0)
+      fog (~> 1.18)
+      kwalify (~> 0.7.2)
+      mime-types (~> 1.16)
+      net-scp (~> 1.1)
+      net-ssh (~> 2.7)
+      nokogiri (~> 1.5.10)
+      rbvmomi (~> 1.6)
+      rspec (~> 2.14)
+      systemu (~> 2.5)
+    rspec-system-puppet (2.2.1)
+      rspec-system (~> 2.0)
+    systemu (2.6.4)
+    trollop (2.0)
+
+PLATFORMS
+  ruby
+
+DEPENDENCIES
+  puppet (>= 3.2)
+  puppet-lint
+  puppet-syntax
+  puppetlabs_spec_helper
+  rspec-puppet (~> 1.0.0)
+  rspec-system-puppet

+ 201 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/orautils/License

@@ -0,0 +1,201 @@
+                              Apache License
+                        Version 2.0, January 2004
+                     http://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+   "License" shall mean the terms and conditions for use, reproduction,
+   and distribution as defined by Sections 1 through 9 of this document.
+
+   "Licensor" shall mean the copyright owner or entity authorized by
+   the copyright owner that is granting the License.
+
+   "Legal Entity" shall mean the union of the acting entity and all
+   other entities that control, are controlled by, or are under common
+   control with that entity. For the purposes of this definition,
+   "control" means (i) the power, direct or indirect, to cause the
+   direction or management of such entity, whether by contract or
+   otherwise, or (ii) ownership of fifty percent (50%) or more of the
+   outstanding shares, or (iii) beneficial ownership of such entity.
+
+   "You" (or "Your") shall mean an individual or Legal Entity
+   exercising permissions granted by this License.
+
+   "Source" form shall mean the preferred form for making modifications,
+   including but not limited to software source code, documentation
+   source, and configuration files.
+
+   "Object" form shall mean any form resulting from mechanical
+   transformation or translation of a Source form, including but
+   not limited to compiled object code, generated documentation,
+   and conversions to other media types.
+
+   "Work" shall mean the work of authorship, whether in Source or
+   Object form, made available under the License, as indicated by a
+   copyright notice that is included in or attached to the work
+   (an example is provided in the Appendix below).
+
+   "Derivative Works" shall mean any work, whether in Source or Object
+   form, that is based on (or derived from) the Work and for which the
+   editorial revisions, annotations, elaborations, or other modifications
+   represent, as a whole, an original work of authorship. For the purposes
+   of this License, Derivative Works shall not include works that remain
+   separable from, or merely link (or bind by name) to the interfaces of,
+   the Work and Derivative Works thereof.
+
+   "Contribution" shall mean any work of authorship, including
+   the original version of the Work and any modifications or additions
+   to that Work or Derivative Works thereof, that is intentionally
+   submitted to Licensor for inclusion in the Work by the copyright owner
+   or by an individual or Legal Entity authorized to submit on behalf of
+   the copyright owner. For the purposes of this definition, "submitted"
+   means any form of electronic, verbal, or written communication sent
+   to the Licensor or its representatives, including but not limited to
+   communication on electronic mailing lists, source code control systems,
+   and issue tracking systems that are managed by, or on behalf of, the
+   Licensor for the purpose of discussing and improving the Work, but
+   excluding communication that is conspicuously marked or otherwise
+   designated in writing by the copyright owner as "Not a Contribution."
+
+   "Contributor" shall mean Licensor and any individual or Legal Entity
+   on behalf of whom a Contribution has been received by Licensor and
+   subsequently incorporated within the Work.
+
+2. Grant of Copyright License. Subject to the terms and conditions of
+   this License, each Contributor hereby grants to You a perpetual,
+   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+   copyright license to reproduce, prepare Derivative Works of,
+   publicly display, publicly perform, sublicense, and distribute the
+   Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of
+   this License, each Contributor hereby grants to You a perpetual,
+   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+   (except as stated in this section) patent license to make, have made,
+   use, offer to sell, sell, import, and otherwise transfer the Work,
+   where such license applies only to those patent claims licensable
+   by such Contributor that are necessarily infringed by their
+   Contribution(s) alone or by combination of their Contribution(s)
+   with the Work to which such Contribution(s) was submitted. If You
+   institute patent litigation against any entity (including a
+   cross-claim or counterclaim in a lawsuit) alleging that the Work
+   or a Contribution incorporated within the Work constitutes direct
+   or contributory patent infringement, then any patent licenses
+   granted to You under this License for that Work shall terminate
+   as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the
+   Work or Derivative Works thereof in any medium, with or without
+   modifications, and in Source or Object form, provided that You
+   meet the following conditions:
+
+   (a) You must give any other recipients of the Work or
+       Derivative Works a copy of this License; and
+
+   (b) You must cause any modified files to carry prominent notices
+       stating that You changed the files; and
+
+   (c) You must retain, in the Source form of any Derivative Works
+       that You distribute, all copyright, patent, trademark, and
+       attribution notices from the Source form of the Work,
+       excluding those notices that do not pertain to any part of
+       the Derivative Works; and
+
+   (d) If the Work includes a "NOTICE" text file as part of its
+       distribution, then any Derivative Works that You distribute must
+       include a readable copy of the attribution notices contained
+       within such NOTICE file, excluding those notices that do not
+       pertain to any part of the Derivative Works, in at least one
+       of the following places: within a NOTICE text file distributed
+       as part of the Derivative Works; within the Source form or
+       documentation, if provided along with the Derivative Works; or,
+       within a display generated by the Derivative Works, if and
+       wherever such third-party notices normally appear. The contents
+       of the NOTICE file are for informational purposes only and
+       do not modify the License. You may add Your own attribution
+       notices within Derivative Works that You distribute, alongside
+       or as an addendum to the NOTICE text from the Work, provided
+       that such additional attribution notices cannot be construed
+       as modifying the License.
+
+   You may add Your own copyright statement to Your modifications and
+   may provide additional or different license terms and conditions
+   for use, reproduction, or distribution of Your modifications, or
+   for any such Derivative Works as a whole, provided Your use,
+   reproduction, and distribution of the Work otherwise complies with
+   the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise,
+   any Contribution intentionally submitted for inclusion in the Work
+   by You to the Licensor shall be under the terms and conditions of
+   this License, without any additional terms or conditions.
+   Notwithstanding the above, nothing herein shall supersede or modify
+   the terms of any separate license agreement you may have executed
+   with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade
+   names, trademarks, service marks, or product names of the Licensor,
+   except as required for reasonable and customary use in describing the
+   origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or
+   agreed to in writing, Licensor provides the Work (and each
+   Contributor provides its Contributions) on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+   implied, including, without limitation, any warranties or conditions
+   of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+   PARTICULAR PURPOSE. You are solely responsible for determining the
+   appropriateness of using or redistributing the Work and assume any
+   risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory,
+   whether in tort (including negligence), contract, or otherwise,
+   unless required by applicable law (such as deliberate and grossly
+   negligent acts) or agreed to in writing, shall any Contributor be
+   liable to You for damages, including any direct, indirect, special,
+   incidental, or consequential damages of any character arising as a
+   result of this License or out of the use or inability to use the
+   Work (including but not limited to damages for loss of goodwill,
+   work stoppage, computer failure or malfunction, or any and all
+   other commercial damages or losses), even if such Contributor
+   has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing
+   the Work or Derivative Works thereof, You may choose to offer,
+   and charge a fee for, acceptance of support, warranty, indemnity,
+   or other liability obligations and/or rights consistent with this
+   License. However, in accepting such obligations, You may act only
+   on Your own behalf and on Your sole responsibility, not on behalf
+   of any other Contributor, and only if You agree to indemnify,
+   defend, and hold each Contributor harmless for any liability
+   incurred by, or claims asserted against, such Contributor by reason
+   of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
+
+APPENDIX: How to apply the Apache License to your work.
+
+   To apply the Apache License to your work, attach the following
+   boilerplate notice, with the fields enclosed by brackets "[]"
+   replaced with your own identifying information. (Don't include
+   the brackets!)  The text should be enclosed in the appropriate
+   comment syntax for the file format. We also recommend that a
+   file or class name and description of purpose be included on the
+   same "printed page" as the copyright notice for easier
+   identification within third-party archives.
+
+Copyright [yyyy] [name of copyright owner]
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.

+ 9 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/orautils/Modulefile

@@ -0,0 +1,9 @@
+name 'biemond-orautils'
+version '0.2.5'
+
+author 'Edwin Biemond'
+license 'Apache 2.0'
+project_page 'https://github.com/biemond/puppet/tree/master/modules/orautils'
+source 'https://github.com/biemond/puppet/tree/master/modules/oradb'
+summary 'Oracle WebLogic and Database linux utilities scripts'
+description 'Oracle WebLogic and Database linux utilities scripts'

+ 140 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/orautils/README.md

@@ -0,0 +1,140 @@
+Oracle WebLogic orautils puppet module
+=======================================================
+[![Build Status](https://travis-ci.org/biemond/biemond-orautils.png)](https://travis-ci.org/biemond/biemond-orautils)
+
+
+changes
+
+- 0.2.5 Custom Identity and Trust store support in all the scripts 
+- 0.2.4 JSSE option, stopWebLogicAdmin localhost bugfix and nodemanager service script fix 
+- 0.2.2 nodemanager address param for the startWebLogicAdmin script ( instead of localhost)  
+- 0.2.0 new way to overide the params , use params.pp or use the variables  
+- 0.1.8 updated license to Apache 2.0
+- 0.1.7 BugFixes for nodemanager startup & showStatus       
+- 0.1.6 Autostart of the Nodemanager ( chkconfig )     
+- 0.1.5 WebLogic 12.1.2 support for NodeManager  
+- 0.1.4 added Suse SLES as Operating System  
+- 0.1.3 bug fixes  
+- 0.1.1 support for Solaris  
+
+
+usage:
+
+change the params.pp class so the defaults match with your environment or add extra values based on the hostname
+
+use:
+
+
+    include orautils
+
+or override the defaults which does not match with your environment and call the class orautils with the necessary parameters
+
+osDomainTypeParam => soa|admin|web|oim
+
+use:
+
+
+    class{'orautils':
+        osOracleHomeParam      => "/opt/oracle",
+        oraInventoryParam      => "/opt/oracle/oraInventory",
+        osDomainTypeParam      => "soa",
+        osLogFolderParam       => "/data/logs",
+        osDownloadFolderParam  => "/data/install",
+        osMdwHomeParam         => "/opt/oracle/wls/Middleware11gR1",
+        osWlHomeParam          => "/opt/oracle/wls/Middleware11gR1/wlserver_10.3",
+        oraUserParam           => "oracle",
+        osDomainParam          => "osbSoaDomain",
+        osDomainPathParam      => "/opt/oracle/wls/Middleware11gR1/user_projects/domains/osbSoaDomain",
+        nodeMgrPathParam       => "/opt/oracle/wls/Middleware11gR1/wlserver_10.3/server/bin",
+        nodeMgrPortParam       => 5556,
+        nodeMgrAddressParam    => 'localhost',
+        wlsUserParam           => "weblogic",
+        wlsPasswordParam       => "weblogic1",
+        wlsAdminServerParam    => "AdminServer",
+        jsseEnabledParam       => false,
+    } 
+
+or with hiera  ( include orautils )
+
+    orautils::osOracleHomeParam:      "/opt/oracle"
+    orautils::oraInventoryParam:      "/opt/oracle/oraInventory"
+    orautils::osDomainTypeParam:      "admin"
+    orautils::osLogFolderParam:       "/data/logs"
+    orautils::osDownloadFolderParam:  "/data/install"
+    orautils::osMdwHomeParam:         "/opt/oracle/wls/Middleware11gR1"
+    orautils::osWlHomeParam:          "/opt/oracle/wls/Middleware11gR1/wlserver_10.3"
+    orautils::oraUserParam:           "oracle"
+    
+    orautils::osDomainParam:          "Wls1036"
+    orautils::osDomainPathParam:      "/opt/oracle/wlsdomains/domains/Wls1036"
+    orautils::nodeMgrPathParam:       "/opt/oracle/middleware11g/wlserver_10.3/server/bin"
+    
+    orautils::nodeMgrPortParam:       5556
+    orautils::nodeMgrAddressParam:    'localhost'
+    orautils::wlsUserParam:           "weblogic"
+    orautils::wlsPasswordParam:       "weblogic1"
+    orautils::wlsAdminServerParam:    "AdminServer"
+    orautils::jsseEnabledParam:       true
+
+
+install auto start script for the nodemanager of WebLogic ( 10.3, 11g, 12.1.1 ) or 12.1.2  
+
+only for WebLogic 12.1.2 and higher
+
+
+     orautils::nodemanagerautostart{"autostart ${wlsDomainName}":
+        version     => "1212",
+        wlHome      => $osWlHome, 
+        user        => $user,
+        domain      => $wlsDomainName,
+        logDir      => $logDir,
+        jsseEnabled => false,
+     }
+
+
+only for WebLogic 10 or 11g
+
+
+     orautils::nodemanagerautostart{"autostart weblogic 11g":
+        version     => "1111",
+        wlHome      => $osWlHome, 
+        user        => $user,
+        jsseEnabled => false,
+     }
+
+
+Generates WebLogic scripts in /opt/scripts/wls
+-----------------------------------------
+
+
+**cleanOracleEnvironment.sh**  
+Remove all Oracle WebLogic existence so you can deploy again  
+Actions  
+1. Remove domain pack files, ${osDownloadFolder}/domain_*.*  
+2. Remove mdwhome, $osOracleHome  
+3. Remove beahome list of user $oraUser  
+4. Remove /etc/oraInst.loc  
+5. Remove ${osDownloadFolder}/osb  
+6. Remove ${osDownloadFolder}/soa  
+7  Remove ${osDownloadFolder}/*.xml  
+
+**showStatus.sh**  
+1. Shows if the AdminServer, Soa and OSB server is running plus the PIDs  
+2. Shows if the NodeManager is running plus the PID  
+
+**startNodeManager.sh**  
+Starts the nodemanager
+
+**stopNodeManager.sh**  
+Stops the nodemanager
+
+**startWeblogicAdmin.sh**  
+1. Checks first if the nodemanager is running  
+2. Check if the AdminServer is already started  
+3. Start the WebLogic Adminserver from the nodemanager   
+
+**stopWeblogicAdmin.sh**  
+1. Checks first if the nodemanager is running  
+2. Check if the AdminServer is running  
+3. Stops the WebLogic Adminserver from the nodemanager  
+     

+ 40 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/orautils/Rakefile

@@ -0,0 +1,40 @@
+require 'rubygems'
+require 'puppetlabs_spec_helper/rake_tasks'
+require 'puppet-lint/tasks/puppet-lint'
+require 'puppet-syntax/tasks/puppet-syntax'
+require 'pathname'
+
+
+
+PuppetLint.configuration.send("disable_80chars")
+# PuppetLint.configuration.send("disable_right_to_left_relationship")
+# PuppetLint.configuration.send("disable_autoloader_layout")
+# PuppetLint.configuration.send("disable_names_containing_dash")
+PuppetLint.configuration.send("disable_class_inherits_from_params_class")
+# PuppetLint.configuration.send("disable_parameter_order")
+# PuppetLint.configuration.send("disable_inherits_across_namespaces")
+# PuppetLint.configuration.send("disable_nested_classes_or_defines")
+PuppetLint.configuration.send("disable_variable_scope")
+# PuppetLint.configuration.send("disable_slash_comments")
+# PuppetLint.configuration.send("disable_star_comments")
+# PuppetLint.configuration.send("disable_selector_inside_resource")
+PuppetLint.configuration.send("disable_case_without_default")
+# PuppetLint.configuration.send("disable_documentation")
+PuppetLint.configuration.send("disable_double_quoted_strings")
+# PuppetLint.configuration.send("disable_only_variable_string")
+# PuppetLint.configuration.send("disable_variables_not_enclosed")
+# PuppetLint.configuration.send("disable_single_quote_string_with_variables")
+# PuppetLint.configuration.send("disable_quoted_booleans")
+#--no-puppet_url_without_modules
+# PuppetLint.configuration.send("disable_variable_contains_dash")
+# PuppetLint.configuration.send("disable_hard_tabs")
+PuppetLint.configuration.send("disable_trailing_whitespace")
+# PuppetLint.configuration.send("disable_2sp_soft_tabs")
+# PuppetLint.configuration.send("disable_arrow_alignment")
+# PuppetLint.configuration.send("disable_unquoted_resource_title")
+# PuppetLint.configuration.send("disable_ensure_first_param")
+# PuppetLint.configuration.send("disable_duplicate_params")
+# PuppetLint.configuration.send("disable_unquoted_file_mode")
+# PuppetLint.configuration.send("disable_file_mode")
+# PuppetLint.configuration.send("disable_ensure_not_symlink_target")
+#--no-unquoted_node_name

+ 246 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/orautils/manifests/init.pp

@@ -0,0 +1,246 @@
+#
+#
+#
+class orautils(
+  $osOracleHomeParam       = undef,
+  $oraInventoryParam       = undef,
+  $osDomainTypeParam       = undef,
+  $osLogFolderParam        = undef,
+  $osDownloadFolderParam   = undef,
+  $osMdwHomeParam          = undef,
+  $osWlHomeParam           = undef,
+  $oraUserParam            = undef,
+  $osDomainParam           = undef,
+  $osDomainPathParam       = undef,
+  $nodeMgrPathParam        = undef,
+  $nodeMgrPortParam        = undef,
+  $nodeMgrAddressParam     = undef,
+  $wlsUserParam            = undef,
+  $wlsPasswordParam        = undef,
+  $wlsAdminServerParam     = undef,
+  $jsseEnabledParam        = undef,
+  $customTrust             = false,
+  $trustKeystoreFile       = undef,
+  $trustKeystorePassphrase = undef,
+) {
+
+  include orautils::params
+
+  case $operatingsystem {
+    'CentOS', 'RedHat', 'OracleLinux', 'Ubuntu', 'Debian', 'SLES', 'Solaris': {
+
+    # fixed
+
+    if $oraUserParam != undef {
+      $user           = $oraUserParam
+    } else {
+      $user           = "oracle"
+    }
+    $group            = "dba"
+    $mode             = "0775"
+
+    # ok
+    $shell            = $orautils::params::shell
+    $userHome         = $orautils::params::userHome
+    $oraInstHome      = $orautils::params::oraInstHome
+
+
+    if ( $osDomainTypeParam == undef ) {
+      $osDomainType = $orautils::params::osDomainType
+    } else {
+      $osDomainType = $osDomainTypeParam
+    }
+
+    if ( $osOracleHomeParam == undef ) {
+      $osOracleHome = $orautils::params::osOracleHome
+    } else {
+      $osOracleHome = $osOracleHomeParam
+    }
+
+    if ( $osDownloadFolderParam == undef ) {
+      $osDownloadFolder = $orautils::params::osDownloadFolder
+    } else {
+      $osDownloadFolder = $osDownloadFolderParam
+    }
+
+    if ( $osMdwHomeParam == undef ) {
+      $osMdwHome = $orautils::params::osMdwHome
+    } else {
+      $osMdwHome = $osMdwHomeParam
+    }
+
+    if ( $osWlHomeParam == undef ) {
+      $osWlHome = $orautils::params::osWlHome
+    } else {
+      $osWlHome = $osWlHomeParam
+    }
+
+    if ( $oraUserParam == undef ) {
+      $oraUser = $orautils::params::oraUser
+    } else {
+      $oraUser = $oraUserParam
+    }
+
+    if ( $osLogFolderParam == undef ) {
+      $osLogFolder = $orautils::params::osLogFolder
+    } else {
+      $osLogFolder = $osLogFolderParam
+    }
+
+    if ( $oraInventoryParam == undef ) {
+      $oraInventory  = $orautils::params::oraInventory
+    } else {
+      $oraInventory  = $oraInventoryParam
+    }
+
+    if ( $osDomainParam == undef ) {
+      $osDomain         = $orautils::params::osDomain
+    } else {
+      $osDomain         = $osDomainParam
+    }
+
+    if ( $osDomainPathParam == undef ) {
+      $osDomainPath     = $orautils::params::osDomainPath
+    } else {
+      $osDomainPath     = $osDomainPathParam
+    }
+
+    if ( $nodeMgrPortParam == undef ) {
+      $nodeMgrPort      = $orautils::params::nodeMgrPort
+    } else {
+      $nodeMgrPort      = $nodeMgrPortParam
+    }
+
+    if ( $nodeMgrPathParam == undef ) {
+      $nodeMgrPath  = $orautils::params::nodeMgrPath
+    } else {
+      $nodeMgrPath = $nodeMgrPathParam
+    }
+
+    if ( $wlsUserParam == undef ) {
+      $wlsUser = $orautils::params::wlsUser
+    } else {
+      $wlsUser = $wlsUserParam
+    }
+
+    if ( $wlsPasswordParam == undef ) {
+      $wlsPassword = $orautils::params::wlsPassword
+    } else {
+      $wlsPassword = $wlsPasswordParam
+    }
+
+    if ( $wlsAdminServerParam == undef ) {
+      $wlsAdminServer = $orautils::params::wlsAdminServer
+    } else {
+      $wlsAdminServer = $wlsAdminServerParam
+    }
+
+    if ( $nodeMgrAddressParam == undef ) {
+      $nodeMgrAddress = $orautils::params::nodeMgrAddress
+    } else {
+      $nodeMgrAddress = $nodeMgrAddressParam
+    }
+
+    if ( $jsseEnabledParam == undef ) {
+      $jsseEnabled = $orautils::params::jsseEnabled
+    } else {
+      $jsseEnabled = $jsseEnabledParam
+    }
+    if $customTrust == true {
+      $trust_env = "-Dweblogic.security.TrustKeyStore=CustomTrust -Dweblogic.security.CustomTrustKeyStoreFileName=${trustKeystoreFile} -Dweblogic.security.CustomTrustKeystorePassPhrase=${trustKeystorePassphrase}"
+    } else {
+      $trust_env = ""
+    }
+    
+    if ! defined(File['/opt/scripts']) {
+      file { '/opt/scripts':
+        ensure  => directory,
+        recurse => false,
+        replace => false,
+        owner   => $user,
+        group   => $group,
+        mode    => $mode,
+      }
+    }
+
+    if ! defined(File['/opt/scripts/wls']) {
+      file { '/opt/scripts/wls':
+        ensure  => directory,
+        recurse => false,
+        replace => false,
+        owner   => $user,
+        group   => $group,
+        mode    => $mode,
+        require => File['/opt/scripts'],
+      }
+    }
+
+
+    file { "showStatus.sh":
+      ensure  => present,
+      path    => "/opt/scripts/wls/showStatus.sh",
+      content => template("orautils/wls/showStatus.sh.erb"),
+      owner   => $user,
+      group   => $group,
+      mode    => $mode,
+      require => File['/opt/scripts/wls'],
+    }
+
+    file { "stopNodeManager.sh":
+      ensure  => present,
+      path    => "/opt/scripts/wls/stopNodeManager.sh",
+      content => template("orautils/wls/stopNodeManager.sh.erb"),
+      owner   => $user,
+      group   => $group,
+      mode    => $mode,
+      require => File['/opt/scripts/wls'],
+    }
+
+    file { "cleanOracleEnvironment.sh":
+      ensure  => present,
+      path    => "/opt/scripts/wls/cleanOracleEnvironment.sh",
+      content => template("orautils/cleanOracleEnvironment.sh.erb"),
+      owner   => 'root',
+      group   => 'root',
+      mode    => '0770',
+      require => File['/opt/scripts/wls'],
+    }
+
+
+    file { "startNodeManager.sh":
+      ensure  => present,
+      path    => "/opt/scripts/wls/startNodeManager.sh",
+      content => template("orautils/startNodeManager.sh.erb"),
+      owner   => $user,
+      group   => $group,
+      mode    => $mode,
+      require => File['/opt/scripts/wls'],
+    }
+
+
+    file { "startWeblogicAdmin.sh":
+      ensure  => present,
+      path    => "/opt/scripts/wls/startWeblogicAdmin.sh",
+      content => template("orautils/startWeblogicAdmin.sh.erb"),
+      owner   => $user,
+      group   => $group,
+      mode    => $mode,
+      require => File['/opt/scripts/wls'],
+    }
+
+    file { "stopWeblogicAdmin.sh":
+      ensure  => present,
+      path    => "/opt/scripts/wls/stopWeblogicAdmin.sh",
+      content => template("orautils/stopWeblogicAdmin.sh.erb"),
+      owner   => $user,
+      group   => $group,
+      mode    => $mode,
+      require => File['/opt/scripts/wls'],
+    }
+
+    }
+    default: {
+      notify{"Operating System not supported":}
+    }
+  }
+}

+ 84 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/orautils/manifests/nodemanagerautostart.pp

@@ -0,0 +1,84 @@
+# == Define: orautils::nodemanagerautostart
+#
+#  autostart of the nodemanager for linux
+#
+define orautils::nodemanagerautostart
+(
+  $version                 = "1111",
+  $wlHome                  = undef,
+  $user                    = 'oracle',
+  $domain                  = undef,
+  $logDir                  = undef,
+  $jsseEnabled             = false,
+  $customTrust             = false,
+  $trustKeystoreFile       = undef,
+  $trustKeystorePassphrase = undef,
+) 
+{
+  if ( $version == "1111" or $version == "1211" or $version == "1036" ) {
+    $nodeMgrPath    = "${wlHome}/common/nodemanager"
+    $nodeMgrBinPath = "${wlHome}/server/bin"
+
+    $scriptName = "nodemanager_${$version}"
+
+    if $logDir == undef {
+      $nodeMgrLckFile = "${nodeMgrPath}/nodemanager.log.lck"
+    } else {
+      $nodeMgrLckFile = "${logDir}/nodemanager.log.lck"
+    }
+  } elsif $version == "1212" {
+    $nodeMgrPath    = "${wlHome}/../user_projects/domains/${domain}/nodemanager"
+    $nodeMgrBinPath = "${wlHome}/../user_projects/domains/${domain}/bin"
+    $scriptName = "nodemanager_${domain}"
+
+    if $logDir == undef {
+      $nodeMgrLckFile = "${nodeMgrPath}/nodemanager_${domain}.log.lck"
+    } else {
+      $nodeMgrLckFile = "${logDir}/nodemanager_${domain}.log.lck"
+    }
+  } else {
+    $nodeMgrPath    = "${wlHome}/common/nodemanager"
+    $nodeMgrBinPath = "${wlHome}/server/bin"
+
+    if $logDir == undef {
+      $nodeMgrLckFile = "${nodeMgrPath}/nodemanager.log.lck"
+    } else {
+      $nodeMgrLckFile = "${logDir}/nodemanager.log.lck"
+    }
+  }
+
+  case $operatingsystem {
+    'CentOS', 'RedHat', 'OracleLinux', 'Ubuntu', 'Debian', 'SLES': {
+
+      $execPath        = '/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:'
+
+      Exec { 
+        path      => $execPath,
+        logoutput => true,
+      }
+    }
+    default: {
+      fail("Unrecognized operating system")
+    }
+  }
+
+  if $customTrust == true {
+    $trust_env = "-Dweblogic.security.TrustKeyStore=CustomTrust -Dweblogic.security.CustomTrustKeyStoreFileName=${trustKeystoreFile} -Dweblogic.security.CustomTrustKeystorePassPhrase=${trustKeystorePassphrase}"
+  } else {
+    $trust_env = ""
+  }
+
+  file { "/etc/init.d/${scriptName}" :
+    ensure  => present,
+    mode    => "0755",
+    content => template("orautils/nodemanager.erb"),
+  }
+
+  exec { "chkconfig ${scriptName}":
+    command => "chkconfig --add ${scriptName}",
+    require => File["/etc/init.d/${scriptName}"],
+    user    => 'root',
+    unless  => "chkconfig | /bin/grep '${scriptName}'",
+  }
+
+}

+ 104 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/orautils/manifests/params.pp

@@ -0,0 +1,104 @@
+#
+#
+#
+class orautils::params()
+{
+
+  $osOracleHome = $::hostname ? {
+    wls12           => "/oracle/product",
+    soabeta2        => "/opt/oracle/wls",
+    oimapp          => "/opt/oracle",
+    default         => "/opt/wls",
+  }
+
+  $oraInventory = $::hostname ? {
+    soabeta2        => "/home/oracle/soabetainv",
+    wls12           => "/oracle/oraInventory",
+    oimapp          => "/opt/oracle/oraInventory",
+    default         => "/opt/wls/oraInventory",
+  }
+
+  $osDomainType = $::hostname ? {
+    devagent31      => "soa",
+    wls12           => "admin",
+    oimapp          => "oim",
+    default         => "web",
+  }
+
+  $osLogFolder = $::hostname ? { 
+    default    => "/data/logs", 
+  }
+
+
+  $osDownloadFolder = $::hostname ? { 
+    default    => "/data/install",
+  }
+
+  $shell        = $::operatingsystem ? { 
+    'Solaris' => "/usr/bin/ksh",
+    default   => "/bin/sh",
+  }
+
+  $osMdwHome     = $::hostname ?  { 
+    wls12           => "${osOracleHome}/Middleware12c",
+    default         => "${osOracleHome}/Middleware11gR1",
+  }
+
+  $osWlHome     = $::hostname ?  { 
+    wls12           => "${osOracleHome}/Middleware12c/wlserver",
+    default         => "${osOracleHome}/Middleware11gR1/wlserver_10.3",
+  }
+
+  $oraUser      = $::hostname ? { 
+    default => "oracle",
+  }
+
+  $userHome     = $::operatingsystem ? { 
+    'Solaris' => "/export/home",
+    default => "/home",
+  }
+
+  $oraInstHome  = $::operatingsystem ? { 
+    'Solaris' => "/var/opt",
+    default => "/etc",
+  }
+
+  $osDomain     = $::hostname ? {   
+    wls12           => "Wls12c",
+    oimapp          => "oimDomain",
+    default         => "osbSoaDomain",
+  }
+
+  $osDomainPath = $::hostname ? {
+    default    => "${osMdwHome}/user_projects/domains/${osDomain}",
+  }
+
+  $nodeMgrPath = $::hostname ?  {
+    wls12           => "${osMdwHome}/user_projects/domains/${osDomain}/bin",
+    default         => "${osWlHome}/server/bin",
+  }
+
+  $nodeMgrPort = $::hostname ?  {
+    default    => "5556",
+  }
+
+  $nodeMgrAddress = $::hostname ?  {
+    default    => "localhost",
+  }
+
+  $wlsUser     = $::hostname ?  {
+    default    => "weblogic",
+  }
+
+  $wlsPassword = $::hostname ?  {
+    default    => "weblogic1",
+  }
+
+  $wlsAdminServer = $::hostname ?  {
+    default    => "AdminServer",
+  }
+
+  $jsseEnabled = $::hostname ?  {
+    default    => false,
+  }
+}

+ 13 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/orautils/metadata.json

@@ -0,0 +1,13 @@
+{
+  "name": "biemond-orautils",
+  "version": "0.2.5",
+  "summary": "Oracle WebLogic and Database linux utilities scripts",
+  "author": "Edwin Biemond",
+  "description": "Oracle WebLogic and Database linux utilities scripts",
+  "dependencies": [],
+  "types": [],
+  "checksums": {},
+  "source": "https://github.com/biemond/puppet/tree/master/modules/oradb",
+  "project_page": "https://github.com/biemond/puppet/tree/master/modules/orautils",
+  "license": "Apache 2.0"
+}

+ 6 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/orautils/spec/spec.opts

@@ -0,0 +1,6 @@
+--format
+s
+--colour
+--loadby
+mtime
+--backtrace

+ 2 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/orautils/spec/spec_helper.rb

@@ -0,0 +1,2 @@
+require 'rubygems'
+require 'puppetlabs_spec_helper/module_spec_helper'

+ 59 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/orautils/templates/cleanOracleEnvironment.sh.erb

@@ -0,0 +1,59 @@
+#!<%= @shell %>
+# *************************************************************************
+# This script can be used to clean the oracle environment
+#
+osOracleHome=<%= @osOracleHome %>
+osDownloadFolder=<%= @osDownloadFolder %>
+osMdwHome=<%= @osMdwHome %>
+osWlHome=<%= @osWlHome %>
+oraUser=<%= @oraUser %>
+userHome=<%= @userHome %>
+oraInstHome=<%= @oraInstHome %>
+osLogFolder=<%= @osLogFolder %>
+oraInventory=<%= @oraInventory %>
+
+echo "vars=${osOracleHome} ${osDownloadFolder} ${osMdwHome} ${osWlHome} ${oraUser}"
+
+
+unamestr=`uname`
+if [[ "$unamestr" == 'SunOS' ]]; then
+   checkStmt='/usr/ucb/ps wwxa'
+else 
+   checkStmt='/bin/ps -eo pid,cmd'
+fi
+
+PID=`${checkStmt} | /bin/grep -i nodemanager.javahome | /bin/grep -v grep | awk '{print $1}'`
+AdminPID=`${checkStmt} | /bin/grep -i AdminServer | /bin/grep -v grep | awk '{print $1}'`
+
+if [ ${PID} ]
+then
+   echo "Kill first the NodeManager with process ID ${PID}..."
+else
+  if [ ${AdminPID} ]
+  then
+    echo "Kill first the AdminServer with process ID ${AdminPID}..."
+  else
+    echo "Clean oracle environment"
+    echo "Step 1 Remove domain pack files, ${osDownloadFolder}/domain_*.*"
+    rm -rf $osDownloadFolder/domain_*.*
+    echo "Step 2 Remove mdwhome, $osOracleHome"
+    rm -rf $osOracleHome
+    echo "Step 3 Remove beahome list of user $oraUser"
+    rm -rf "${userHome}/${oraUser}/bea"
+    echo "Step 4 Remove ${oraInstHome}/oraInst.loc"
+    rm -rf "${oraInstHome}/oraInst.loc"  
+    echo "Step 5 Remove ${osDownloadFolder}/osb"
+    rm -rf "${osDownloadFolder}/osb"  
+    echo "Step 6 Remove ${osDownloadFolder}/soa"
+    rm -rf "${osDownloadFolder}/soa"   
+    echo "Step 7 Remove ${osDownloadFolder}/*.xml"
+    rm -rf $osDownloadFolder/*.xml   
+    echo "Step 8 Remove ${osLogFolder}/*"
+    rm -rf $osLogFolder/*   
+    echo "Step 9 Remove ${oraInventory}"
+    rm -rf $oraInventory   
+    echo "Step 10 Remove domain secureconfig files"
+    rm -rf "${userHome}/${oraUser}/*WebLogicConfig.properties" "${userHome}/${oraUser}/*WebLogicKey.properties"   
+
+  fi
+fi

+ 181 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/orautils/templates/nodemanager.erb

@@ -0,0 +1,181 @@
+#!/bin/sh
+#
+### BEGIN INIT INFO
+# Provides:        nodemanager
+# Required-Start:
+# Required-Stop:
+# Default-Start:    2 3 4 5
+# Default-Stop:        0 1 6
+# Short-Description:    WebLogic Nodemanager
+### END INIT INFO
+
+# nodemgr Oracle Weblogic NodeManager service
+#
+# chkconfig:   345 99 15
+# description: Oracle Weblogic NodeManager service
+# 
+
+### BEGIN INIT INFO
+# Provides: nodemgr
+# Required-Start: $network $local_fs
+# Required-Stop:
+# Should-Start:
+# Should-Stop:
+# Default-Start: 3 4 5
+# Default-Stop: 0 1 2 6
+# Short-Description: Oracle Weblogic NodeManager service.
+# Description: Starts and stops Oracle Weblogic NodeManager.
+### END INIT INFO
+
+# Source function library.
+if test -f /lib/lsb/init-functions; then
+    . /lib/lsb/init-functions
+fi
+. /etc/init.d/functions
+
+# set NodeManager environment
+NodeManagerLockFile=<%= @nodeMgrLckFile %>
+
+
+exec=<%= @nodeMgrBinPath %>/startNodeManager.sh
+prog='nodemanager'
+user='<%= @user %>'
+
+<% if @jsseEnabled == true %>
+JSEE_OPTIONS="-Dweblogic.ssl.JSSEEnabled=true -Dweblogic.security.SSL.enableJSSE=true"
+<% else %>
+JSEE_OPTIONS="-Dweblogic.ssl.JSSEEnabled=false -Dweblogic.security.SSL.enableJSSE=false"
+<% end %>
+
+TRUST_OPTIONS='<%= @trust_env %>'
+
+is_nodemgr_running() {
+    local nodemgr_cnt=`ps -ef        | \
+        grep -i 'java '                  | \
+        grep -i ' weblogic.NodeManager '  | \
+        grep -v grep                  | \
+        wc -l`
+    echo $nodemgr_cnt
+}
+
+get_nodemgr_pid() {
+    nodemgr_pid=0
+    if [ `is_nodemgr_running` -eq 1 ]; then
+        nodemgr_pid=`ps -ef             | \
+            grep -i 'java '                 | \
+            grep -i ' weblogic.NodeManager ' | \
+            grep -v grep                 | \
+            tr -s ' '                    | \
+            cut -d' ' -f2`
+    fi
+    echo $nodemgr_pid
+}
+
+check_nodemgr_status () {
+    local retval=0
+    local nodemgr_cnt=`is_nodemgr_running`
+    if [ $nodemgr_cnt -eq 0 ]; then
+        if [ -f $NodeManagerLockFile ]; then
+            retval=2
+        else
+            retval=3
+        fi
+    elif [ $nodemgr_cnt -gt 1 ]; then
+        retval=4
+    else
+        retval=0
+    fi
+
+    echo $retval
+}
+
+start() {
+    ulimit -n 65535
+    [ -x $exec ] || exit 5
+    echo -n $"Starting $prog: "
+    sleep 10
+    su $user -c "export JAVA_OPTIONS='${JSEE_OPTIONS} ${TRUST_OPTIONS}';$exec &"
+    retval=$?
+    echo
+    return $retval
+}
+
+stop() {
+    echo -n $"Stopping $prog: "
+    kill -s 9 `get_nodemgr_pid` &> /dev/null
+    retval=$?
+    echo
+    [ $retval -eq 0 ] && rm -f $NodeManagerLockFile
+    return $retval
+}
+
+restart() {
+    stop
+    start
+}
+
+reload() {
+    restart
+}
+
+force_reload() {
+    restart
+}
+
+rh_status() {
+    local retval=`check_nodemgr_status`
+    if [ $retval -eq 0 ]; then
+        echo "$prog (pid:`get_nodemgr_pid`) is running..."
+    elif [ $retval -eq 4 ]; then
+        echo "Multiple instances of $prog are running..."
+    else
+        echo "$prog is stopped"
+    fi
+    return $retval
+}
+
+rh_status_q() {
+    rh_status >/dev/null  2>&1
+}
+
+case "$1" in
+    start)
+        rh_status_q && exit 0
+        $1
+        ;;
+    stop)
+        rh_status_q || exit 0
+        $1
+        ;;
+    restart)
+        $1
+        ;;
+    reload)
+        rh_status_q || exit 7
+        $1
+        ;;
+    force-reload)
+        force_reload
+        ;;
+    status)
+        rh_status
+        ;;
+    condrestart|try-restart)
+        rh_status_q || exit 0
+        restart
+        ;;
+    *)
+        echo -n "Usage: $0 {"
+        echo -n "start|"
+        echo -n "stop|"
+        echo -n "status|"
+        echo -n "restart|"
+        echo -n "condrestart|"
+        echo -n "try-restart|"
+        echo -n "reload|"
+        echo -n "force-reload"
+        echo "}"
+
+        exit 2
+esac
+exit $?

+ 38 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/orautils/templates/startNodeManager.sh.erb

@@ -0,0 +1,38 @@
+#!<%= @shell %>
+# *************************************************************************
+
+echo "Starting the Weblogic NodeManager...."
+echo "Checking if the Weblogic NodeManager is already started...."
+
+<% if @jsseEnabled == true %>
+export JAVA_OPTIONS="-Dweblogic.ssl.JSSEEnabled=true -Dweblogic.security.SSL.enableJSSE=true <%= @trust_env %>"
+<% else %>
+export JAVA_OPTIONS="-Dweblogic.ssl.JSSEEnabled=false -Dweblogic.security.SSL.enableJSSE=false <%= @trust_env %>"
+<% end %>
+
+
+unamestr=`uname`
+if [[ "$unamestr" == 'SunOS' ]]; then
+   checkStmt='/usr/ucb/ps wwxa'
+else 
+   checkStmt='/bin/ps -eo pid,cmd'
+fi
+
+pid=`${checkStmt} | /bin/grep -i nodemanager.javahome | /bin/grep -v grep | awk '{print $1}'`
+
+if [ ${pid} ]
+then
+  echo "The NodeManager is already running.. NodeManager NOT started again...."
+else
+  echo "The NodeManager is not running yet.. Starting NodeManager now...."
+  sleep 3
+  <%= @nodeMgrPath %>/startNodeManager.sh & 
+  sleep 5
+  pid=`${checkStmt} | /bin/grep -i nodemanager.javahome | /bin/grep -v grep | awk '{print $1}'`
+  if [ ${pid} ]
+  then
+    echo "NodeManager is started with pid : $pid...."
+  else
+    echo "Error while starting NodeManager...."
+  fi
+fi

+ 55 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/orautils/templates/startWeblogicAdmin.sh.erb

@@ -0,0 +1,55 @@
+#!<%= @shell %>
+# *************************************************************************
+osWlHome=<%= @osWlHome %>
+osDomain=<%= @osDomain %>
+osDomainPath=<%= @osDomainPath %>
+nodeMgrPort=<%= @nodeMgrPort %>
+hostname=<%= @nodeMgrAddress %>
+user=<%= @wlsUser %>
+password=<%= @wlsPassword %>
+wlsAdminServer=<%= @wlsAdminServer %>
+
+<% if @jsseEnabled == true %>
+export CONFIG_JVM_ARGS='-Dweblogic.ssl.JSSEEnabled=true -Dweblogic.security.SSL.enableJSSE=true <%= @trust_env %>'
+<% else %>
+export CONFIG_JVM_ARGS='-Dweblogic.ssl.JSSEEnabled=false -Dweblogic.security.SSL.enableJSSE=false <%= @trust_env %>'
+<% end %>
+
+echo "Starting Weblogic ${wlsAdminServer} for domain ${osDomain}...."
+echo "Checking if Weblogic ${wlsAdminServer} for domain ${osDomain} is already started...."
+echo "CONFIG_JVM_ARGS ${CONFIG_JVM_ARGS}"
+
+
+unamestr=`uname`
+if [[ "$unamestr" == 'SunOS' ]]; then
+   checkStmt='/usr/ucb/ps wwxa'
+else 
+   checkStmt='/bin/ps -eo pid,cmd'
+fi
+
+pid=`${checkStmt} | /bin/grep -i ${wlsAdminServer} | /bin/grep -i ${osDomain} | /bin/grep -v grep | awk '{print $1}'`
+nodePid=`${checkStmt} | /bin/grep -i nodemanager.javahome | /bin/grep -v grep | awk '{print $1}'`
+
+if [[ ${pid} ]]
+then
+  echo "The Weblogic ${wlsAdminServer} for domain ${osDomain} is already running...."
+  echo "Server NOT started again...."
+else
+  if [[ ${nodePid} ]]
+  then
+    echo "The Weblogic ${wlsAdminServer} for domain ${osDomain} is not running...."
+    echo "Starting Weblogic ${wlsAdminServer} for domain ${osDomain}...."
+    $osWlHome/common/bin/wlst.sh <<-EOF
+nmConnect('${user}','${password}','${hostname}','${nodeMgrPort}','${osDomain}','${osDomainPath}','ssl')
+nmStart('${wlsAdminServer}')
+nmServerStatus('${wlsAdminServer}')
+nmDisconnect() 
+EOF
+
+    echo "The Weblogic ${wlsAdminServer} for domain ${osDomain} is starting...."
+  else
+    echo "NodeManager is not running on this machine ${hostname}" 
+    echo "Start the NodeManager first" 
+  fi
+fi
+echo "Done...."

+ 52 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/orautils/templates/stopWeblogicAdmin.sh.erb

@@ -0,0 +1,52 @@
+#!<%= @shell %>
+# *************************************************************************
+osWlHome=<%= @osWlHome %>
+osDomain=<%= @osDomain %>
+osDomainPath=<%= @osDomainPath %>
+nodeMgrPort=<%= @nodeMgrPort %>
+hostname=<%= @nodeMgrAddress %>
+user=<%= @wlsUser %>
+password=<%= @wlsPassword %>
+wlsAdminServer=<%= @wlsAdminServer %>
+
+<% if @jsseEnabled == true %>
+export CONFIG_JVM_ARGS='-Dweblogic.ssl.JSSEEnabled=true -Dweblogic.security.SSL.enableJSSE=true <%= @trust_env %>'
+<% else %>
+export CONFIG_JVM_ARGS='-Dweblogic.ssl.JSSEEnabled=false -Dweblogic.security.SSL.enableJSSE=false <%= @trust_env %>'
+<% end %>
+
+echo "Stopping Weblogic ${wlsAdminServer} for domain ${osDomain}...."
+echo "Checking if Weblogic ${wlsAdminServer} for domain ${osDomain} is up...."
+echo "CONFIG_JVM_ARGS ${CONFIG_JVM_ARGS}"
+
+
+unamestr=`uname`
+if [[ "$unamestr" == 'SunOS' ]]; then
+   checkStmt='/usr/ucb/ps wwxa'
+else 
+   checkStmt='/bin/ps -eo pid,cmd'
+fi
+
+pid=`${checkStmt} | /bin/grep -i ${wlsAdminServer} | /bin/grep -i ${osDomain} | /bin/grep -v grep | awk '{print $1}'`
+nodePid=`${checkStmt} | /bin/grep -i nodemanager.javahome | /bin/grep -v grep | awk '{print $1}'`
+
+if [[ ${pid} ]]
+then
+  if [[ ${nodePid} ]]
+  then
+    echo "The Weblogic ${wlsAdminServer} for domain ${osDomain} is running.. Stopping ${wlsAdminServer} NOW...."
+    $osWlHome/common/bin/wlst.sh <<-EOF
+nmConnect('${user}','${password}','${hostname}','${nodeMgrPort}','${osDomain}','${osDomainPath}','ssl')
+nmKill('${wlsAdminServer}')
+nmDisconnect() 
+EOF
+
+
+  else
+    echo "NodeManager is not running on this machine ${hostname}" 
+    echo "Start the NodeManager first" 
+  fi
+else
+  echo "The Weblogic ${wlsAdminServer} for domain ${osDomain} is NOT running...."
+fi
+echo "Done...."

+ 119 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/orautils/templates/wls/showStatus.sh.erb

@@ -0,0 +1,119 @@
+#<%= @shell %>
+# *************************************************************************
+# This script can be used to show the statusses of the weblogic processes
+#
+ 
+domainType=<%= @osDomainType %>
+ 
+unamestr=`uname`
+if [[ "$unamestr" == 'SunOS' ]]; then
+   checkStmt='/usr/ucb/ps wwxa'
+else
+   checkStmt='/bin/ps -eo pid,cmd'
+fi
+ 
+AdminStatus=`${checkStmt} | /bin/grep -i AdminServer | /bin/grep -v grep | awk '{print $1}'`
+SoaServer1Status=`${checkStmt} | /bin/grep -i soa_server1 | /bin/grep -v grep | awk '{print $1}'`
+OsbServer1Status=`${checkStmt} | /bin/grep -i osb_server1 | /bin/grep -v grep | awk '{print $1}'`
+BamServer1Status=`${checkStmt} | /bin/grep -i bam_server1 | /bin/grep -v grep | awk '{print $1}'`
+WebServer1Status=`${checkStmt} | /bin/grep -i web_server1 | /bin/grep -v grep | awk '{print $1}'`
+OimServer1Status=`${checkStmt} | /bin/grep -i oim_server1 | /bin/grep -v grep | awk '{print $1}'`
+OamServer1Status=`${checkStmt} | /bin/grep -i oam_server1 | /bin/grep -v grep | awk '{print $1}'`
+
+NodeManagerStatus=`${checkStmt} | /bin/grep -i nodemanager.javahome | /bin/grep -v grep | awk '{print $1}'`
+ 
+if [ ${AdminStatus} ]
+then
+  AdminPid=$AdminStatus
+  AdminStatus="Online"
+else
+  AdminStatus='---'
+  AdminPid="---"
+fi
+ 
+if [ ${SoaServer1Status} ]
+then
+  SoaServer1Pid=$SoaServer1Status
+  SoaServer1Status="Online"
+else
+  SoaServer1Status='---'
+  SoaServer1Pid="---"
+fi
+ 
+if [ ${OsbServer1Status} ]
+then
+  OsbServer1Pid=$OsbServer1Status
+  OsbServer1Status="Online"
+else
+  OsbServer1Status='---'
+  OsbServer1Pid="---"
+fi
+
+if [ ${BamServer1Status} ]
+then
+  BamServer1Pid=$BamServer1Status
+  BamServer1Status="Online"
+else
+  BamServer1Status='---'
+  BamServer1Pid="---"
+fi
+
+if [ ${OimServer1Status} ]
+then
+  OimServer1Pid=$OimServer1Status
+  OimServer1Status="Online"
+else
+  OimServer1Status='---'
+  OimServer1Pid="---"
+fi
+
+if [ ${OamServer1Status} ]
+then
+  OamServer1Pid=$OamServer1Status
+  OamServer1Status="Online"
+else
+  OamServer1Status='---'
+  OamServer1Pid="---"
+fi
+
+ 
+if [ ${WebServer1Status} ]
+then
+  WebServer1Pid=$WebServer1Status
+  WebServer1Status="Online"
+else
+  WebServer1Status='---'
+  WebServer1Pid="---"
+fi
+ 
+if [ ${NodeManagerStatus} ]
+then
+  NodeManagerPid=$NodeManagerStatus
+  NodeManagerStatus="Online"
+else
+  NodeManagerStatus='---'
+  NodeManagerPid="---"
+fi
+ 
+ 
+SEP=`printf "|%18s|%8s|%6s|\n" __________________ ________ ______`
+ 
+ 
+echo " __________________________________"
+printf "|%18s|%8s|%6s|\n" NAME STATUS PID
+echo $SEP
+printf "|%18s|%8s|%6s|\n" "AdminServer " $AdminStatus $AdminPid
+ 
+if [[ "$domainType" == 'soa' ]]; then
+  printf "|%18s|%8s|%6s|\n" soa_server1 $SoaServer1Status $SoaServer1Pid
+  printf "|%18s|%8s|%6s|\n" osb_server1 $OsbServer1Status $OsbServer1Pid
+elif [[ "$domainType" == 'oim' ]]; then
+  printf "|%18s|%8s|%6s|\n" soa_server1 $SoaServer1Status $SoaServer1Pid
+  printf "|%18s|%8s|%6s|\n" oim_server1 $OimServer1Status $OimServer1Pid
+  printf "|%18s|%8s|%6s|\n" oam_server1 $OamServer1Status $OamServer1Pid
+elif [[ "$domainType" == 'web' ]]; then
+ printf "|%18s|%8s|%6s|\n" web_server1 $WebServer1Status $WebServer1Pid
+fi
+echo $SEP
+printf "|%18s|%8s|%6s|\n" NodeManager $NodeManagerStatus $NodeManagerPid
+echo $SEP

+ 23 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/orautils/templates/wls/stopNodeManager.sh.erb

@@ -0,0 +1,23 @@
+#<%= @shell %>
+# *************************************************************************
+# This script can be used to stop the WebLogic NodeManager
+#
+
+echo "Stopping Nodemanager..."
+
+unamestr=`uname`
+if [[ "$unamestr" == 'SunOS' ]]; then
+   checkStmt='/usr/ucb/ps wwxa'
+else 
+   checkStmt='/bin/ps -eo pid,cmd'
+fi
+
+PID=`${checkStmt} | /bin/grep -i nodemanager.javahome | /bin/grep -v grep | awk '{print $1}'`
+
+if [ ${PID} ]
+then
+   kill ${PID}
+   echo "NodeManager with process ID ${PID} will be shutdown..."
+else
+   echo "No NodeManager process found!"
+fi

+ 278 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/CHANGELOG

@@ -0,0 +1,278 @@
+2013-05-06 - Jeff McCune <jeff@puppetlabs.com> - 4.1.0
+ * (#20582) Restore facter_dot_d to stdlib for PE users (3b887c8)
+ * (maint) Update Gemfile with GEM_FACTER_VERSION (f44d535)
+
+2013-05-06 - Alex Cline <acline@us.ibm.com> - 4.1.0
+ * Terser method of string to array conversion courtesy of ethooz. (d38bce0)
+
+2013-05-06 - Alex Cline <acline@us.ibm.com> 4.1.0
+ * Refactor ensure_resource expectations (b33cc24)
+
+2013-05-06 - Alex Cline <acline@us.ibm.com> 4.1.0
+ * Changed str-to-array conversion and removed abbreviation. (de253db)
+
+2013-05-03 - Alex Cline <acline@us.ibm.com> 4.1.0
+ * (#20548) Allow an array of resource titles to be passed into the ensure_resource function (e08734a)
+
+2013-05-02 - Raphaël Pinson <raphael.pinson@camptocamp.com> - 4.1.0
+ * Add a dirname function (2ba9e47)
+
+2013-04-29 - Mark Smith-Guerrero <msmithgu@gmail.com> - 4.1.0
+ * (maint) Fix a small typo in hash() description (928036a)
+
+2013-04-12 - Jeff McCune <jeff@puppetlabs.com> - 4.0.2
+ * Update user information in gemspec to make the intent of the Gem clear.
+
+2013-04-11 - Jeff McCune <jeff@puppetlabs.com> - 4.0.1
+ * Fix README function documentation (ab3e30c)
+
+2013-04-11 - Jeff McCune <jeff@puppetlabs.com> - 4.0.0
+ * stdlib 4.0 drops support with Puppet 2.7
+ * stdlib 4.0 preserves support with Puppet 3
+
+2013-04-11 - Jeff McCune <jeff@puppetlabs.com> - 4.0.0
+ * Add ability to use puppet from git via bundler (9c5805f)
+
+2013-04-10 - Jeff McCune <jeff@puppetlabs.com> - 4.0.0
+ * (maint) Make stdlib usable as a Ruby GEM (e81a45e)
+
+2013-04-10 - Erik Dalén <dalen@spotify.com> - 4.0.0
+ * Add a count function (f28550e)
+
+2013-03-31 - Amos Shapira <ashapira@atlassian.com> - 4.0.0
+ * (#19998) Implement any2array (7a2fb80)
+
+2013-03-29 - Steve Huff <shuff@vecna.org> - 4.0.0
+ * (19864) num2bool match fix (8d217f0)
+
+2013-03-20 - Erik Dalén <dalen@spotify.com> - 4.0.0
+ * Allow comparisons of Numeric and number as String (ff5dd5d)
+
+2013-03-26 - Richard Soderberg <rsoderberg@mozilla.com> - 4.0.0
+ * add suffix function to accompany the prefix function (88a93ac)
+
+2013-03-19 - Kristof Willaert <kristof.willaert@gmail.com> - 4.0.0
+ * Add floor function implementation and unit tests (0527341)
+
+2012-04-03 - Eric Shamow <eric@puppetlabs.com> - 4.0.0
+ * (#13610) Add is_function_available to stdlib (961dcab)
+
+2012-12-17 - Justin Lambert <jlambert@eml.cc> - 4.0.0
+ * str2bool should return a boolean if called with a boolean (5d5a4d4)
+
+2012-10-23 - Uwe Stuehler <ustuehler@team.mobile.de> - 4.0.0
+ * Fix number of arguments check in flatten() (e80207b)
+
+2013-03-11 - Jeff McCune <jeff@puppetlabs.com> - 4.0.0
+ * Add contributing document (96e19d0)
+
+2013-03-04 - Raphaël Pinson <raphael.pinson@camptocamp.com> - 4.0.0
+ * Add missing documentation for validate_augeas and validate_cmd to README.markdown (a1510a1)
+
+2013-02-14 - Joshua Hoblitt <jhoblitt@cpan.org> - 4.0.0
+ * (#19272) Add has_element() function (95cf3fe)
+
+2013-02-07 - Raphaël Pinson <raphael.pinson@camptocamp.com> - 4.0.0
+ * validate_cmd(): Use Puppet::Util::Execution.execute when available (69248df)
+
+2012-12-06 - Raphaël Pinson <raphink@gmail.com> - 4.0.0
+ * Add validate_augeas function (3a97c23)
+
+2012-12-06 - Raphaël Pinson <raphink@gmail.com> - 4.0.0
+ * Add validate_cmd function (6902cc5)
+
+2013-01-14 - David Schmitt <david@dasz.at> - 4.0.0
+ * Add geppetto project definition (b3fc0a3)
+
+2013-01-02 - Jaka Hudoklin <jakahudoklin@gmail.com> - 4.0.0
+ * Add getparam function to get defined resource parameters (20e0e07)
+
+2013-01-05 - Jeff McCune <jeff@puppetlabs.com> - 4.0.0
+ * (maint) Add Travis CI Support (d082046)
+
+2012-12-04 - Jeff McCune <jeff@puppetlabs.com> - 4.0.0
+ * Clarify that stdlib 3 supports Puppet 3 (3a6085f)
+
+2012-11-30 - Erik Dalén <dalen@spotify.com> - 4.0.0
+ * maint: style guideline fixes (7742e5f)
+
+2012-11-09 - James Fryman <james@frymanet.com> - 4.0.0
+ * puppet-lint cleanup (88acc52)
+
+2012-11-06 - Joe Julian <me@joejulian.name> - 4.0.0
+ * Add function, uriescape, to URI.escape strings. Redmine #17459 (fd52b8d)
+
+2012-09-18 - Chad Metcalf <chad@wibidata.com> - 3.2.0
+ * Add an ensure_packages function. (8a8c09e)
+
+2012-11-23 - Erik Dalén <dalen@spotify.com> - 3.2.0
+ * (#17797) min() and max() functions (9954133)
+
+2012-05-23 - Peter Meier <peter.meier@immerda.ch> - 3.2.0
+ * (#14670) autorequire a file_line resource's path (dfcee63)
+
+2012-11-19 - Joshua Harlan Lifton <lifton@puppetlabs.com> - 3.2.0
+ * Add join_keys_to_values function (ee0f2b3)
+
+2012-11-17 - Joshua Harlan Lifton <lifton@puppetlabs.com> - 3.2.0
+ * Extend delete function for strings and hashes (7322e4d)
+
+2012-08-03 - Gary Larizza <gary@puppetlabs.com> - 3.2.0
+ * Add the pick() function (ba6dd13)
+
+2012-03-20 - Wil Cooley <wcooley@pdx.edu> - 3.2.0
+ * (#13974) Add predicate functions for interface facts (f819417)
+
+2012-11-06 - Joe Julian <me@joejulian.name> - 3.2.0
+ * Add function, uriescape, to URI.escape strings. Redmine #17459 (70f4a0e)
+
+2012-10-25 - Jeff McCune <jeff@puppetlabs.com> - 3.1.1
+ * (maint) Fix spec failures resulting from Facter API changes (97f836f)
+
+2012-10-23 - Matthaus Owens <matthaus@puppetlabs.com> - 3.1.0
+ * Add PE facts to stdlib (cdf3b05)
+
+2012-08-16 - Jeff McCune <jeff@puppetlabs.com> - 3.0.1
+ * Fix accidental removal of facts_dot_d.rb in 3.0.0 release
+
+2012-08-16 - Jeff McCune <jeff@puppetlabs.com> - 3.0.0
+ * stdlib 3.0 drops support with Puppet 2.6
+ * stdlib 3.0 preserves support with Puppet 2.7
+
+2012-08-07 - Dan Bode <dan@puppetlabs.com> - 3.0.0
+ * Add function ensure_resource and defined_with_params (ba789de)
+
+2012-07-10 - Hailee Kenney <hailee@puppetlabs.com> - 3.0.0
+ * (#2157) Remove facter_dot_d for compatibility with external facts (f92574f)
+
+2012-04-10 - Chris Price <chris@puppetlabs.com> - 3.0.0
+ * (#13693) moving logic from local spec_helper to puppetlabs_spec_helper (85f96df)
+
+2012-10-25 - Jeff McCune <jeff@puppetlabs.com> - 2.5.1
+ * (maint) Fix spec failures resulting from Facter API changes (97f836f)
+
+2012-10-23 - Matthaus Owens <matthaus@puppetlabs.com> - 2.5.0
+ * Add PE facts to stdlib (cdf3b05)
+
+2012-08-15 - Dan Bode <dan@puppetlabs.com> - 2.5.0
+ * Explicitly load functions used by ensure_resource (9fc3063)
+
+2012-08-13 - Dan Bode <dan@puppetlabs.com> - 2.5.0
+ * Add better docs about duplicate resource failures (97d327a)
+
+2012-08-13 - Dan Bode <dan@puppetlabs.com> - 2.5.0
+ * Handle undef for parameter argument (4f8b133)
+
+2012-08-07 - Dan Bode <dan@puppetlabs.com> - 2.5.0
+ * Add function ensure_resource and defined_with_params (a0cb8cd)
+
+2012-08-20 - Jeff McCune <jeff@puppetlabs.com> - 2.5.0
+ * Disable tests that fail on 2.6.x due to #15912 (c81496e)
+
+2012-08-20 - Jeff McCune <jeff@puppetlabs.com> - 2.5.0
+ * (Maint) Fix mis-use of rvalue functions as statements (4492913)
+
+2012-08-20 - Jeff McCune <jeff@puppetlabs.com> - 2.5.0
+ * Add .rspec file to repo root (88789e8)
+
+2012-06-07 - Chris Price <chris@puppetlabs.com> - 2.4.0
+ * Add support for a 'match' parameter to file_line (a06c0d8)
+
+2012-08-07 - Erik Dalén <dalen@spotify.com> - 2.4.0
+ * (#15872) Add to_bytes function (247b69c)
+
+2012-07-19 - Jeff McCune <jeff@puppetlabs.com> - 2.4.0
+ * (Maint) use PuppetlabsSpec::PuppetInternals.scope (master) (deafe88)
+
+2012-07-10 - Hailee Kenney <hailee@puppetlabs.com> - 2.4.0
+ * (#2157) Make facts_dot_d compatible with external facts (5fb0ddc)
+
+2012-03-16 - Steve Traylen <steve.traylen@cern.ch> - 2.4.0
+ * (#13205) Rotate array/string randomley based on fqdn, fqdn_rotate() (fef247b)
+
+2012-05-22 - Peter Meier <peter.meier@immerda.ch> - 2.3.3
+ * fix regression in #11017 properly (f0a62c7)
+
+2012-05-10 - Jeff McCune <jeff@puppetlabs.com> - 2.3.3
+ * Fix spec tests using the new spec_helper (7d34333)
+
+2012-05-10 - Puppet Labs <support@puppetlabs.com> - 2.3.2
+ * Make file_line default to ensure => present (1373e70)
+ * Memoize file_line spec instance variables (20aacc5)
+ * Fix spec tests using the new spec_helper (1ebfa5d)
+ * (#13595) initialize_everything_for_tests couples modules Puppet ver (3222f35)
+ * (#13439) Fix MRI 1.9 issue with spec_helper (15c5fd1)
+ * (#13439) Fix test failures with Puppet 2.6.x (665610b)
+ * (#13439) refactor spec helper for compatibility with both puppet 2.7 and master (82194ca)
+ * (#13494) Specify the behavior of zero padded strings (61891bb)
+
+2012-03-29 Puppet Labs <support@puppetlabs.com> - 2.1.3
+* (#11607) Add Rakefile to enable spec testing
+* (#12377) Avoid infinite loop when retrying require json
+
+2012-03-13 Puppet Labs <support@puppetlabs.com> - 2.3.1
+* (#13091) Fix LoadError bug with puppet apply and puppet_vardir fact
+
+2012-03-12 Puppet Labs <support@puppetlabs.com> - 2.3.0
+* Add a large number of new Puppet functions
+* Backwards compatibility preserved with 2.2.x
+
+2011-12-30 Puppet Labs <support@puppetlabs.com> - 2.2.1
+* Documentation only release for the Forge
+
+2011-12-30 Puppet Labs <support@puppetlabs.com> - 2.1.2
+* Documentation only release for PE 2.0.x
+
+2011-11-08 Puppet Labs <support@puppetlabs.com> - 2.2.0
+* #10285 - Refactor json to use pson instead.
+* Maint  - Add watchr autotest script
+* Maint  - Make rspec tests work with Puppet 2.6.4
+* #9859  - Add root_home fact and tests
+
+2011-08-18 Puppet Labs <support@puppetlabs.com> - 2.1.1
+* Change facts.d paths to match Facter 2.0 paths.
+* /etc/facter/facts.d
+* /etc/puppetlabs/facter/facts.d
+
+2011-08-17 Puppet Labs <support@puppetlabs.com> - 2.1.0
+* Add R.I. Pienaar's facts.d custom facter fact
+* facts defined in /etc/facts.d and /etc/puppetlabs/facts.d are
+  automatically loaded now.
+
+2011-08-04 Puppet Labs <support@puppetlabs.com> - 2.0.0
+* Rename whole_line to file_line
+* This is an API change and as such motivating a 2.0.0 release according to semver.org.
+
+2011-08-04 Puppet Labs <support@puppetlabs.com> - 1.1.0
+* Rename append_line to whole_line
+* This is an API change and as such motivating a 1.1.0 release.
+
+2011-08-04 Puppet Labs <support@puppetlabs.com> - 1.0.0
+* Initial stable release
+* Add validate_array and validate_string functions
+* Make merge() function work with Ruby 1.8.5
+* Add hash merging function
+* Add has_key function
+* Add loadyaml() function
+* Add append_line native
+
+2011-06-21 Jeff McCune <jeff@puppetlabs.com> - 0.1.7
+* Add validate_hash() and getvar() functions
+
+2011-06-15 Jeff McCune <jeff@puppetlabs.com> - 0.1.6
+* Add anchor resource type to provide containment for composite classes
+
+2011-06-03 Jeff McCune <jeff@puppetlabs.com> - 0.1.5
+* Add validate_bool() function to stdlib
+
+0.1.4 2011-05-26 Jeff McCune <jeff@puppetlabs.com>
+* Move most stages after main
+
+0.1.3 2011-05-25 Jeff McCune <jeff@puppetlabs.com>
+* Add validate_re() function
+
+0.1.2 2011-05-24 Jeff McCune <jeff@puppetlabs.com>
+* Update to add annotated tag
+
+0.1.1 2011-05-24 Jeff McCune <jeff@puppetlabs.com>
+* Add stdlib::stages class with a standard set of stages

+ 65 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/CONTRIBUTING.md

@@ -0,0 +1,65 @@
+# How to contribute
+
+Third-party patches are essential for keeping stdlib great. We simply can't
+access the huge number of platforms and myriad configurations for running
+stdlib. We want to keep it as easy as possible to contribute changes that
+get things working in your environment. There are a few guidelines that we
+need contributors to follow so that we can have a chance of keeping on
+top of things.
+
+## Getting Started
+
+* Make sure you have a [Redmine account](http://projects.puppetlabs.com)
+* Make sure you have a [GitHub account](https://github.com/signup/free)
+* Submit a ticket for your issue, assuming one does not already exist.
+  * Clearly describe the issue including steps to reproduce when it is a bug.
+  * Make sure you fill in the earliest version that you know has the issue.
+* Fork the repository on GitHub
+
+## Making Changes
+
+* Create a topic branch from where you want to base your work.
+  * This is usually the master branch.
+  * Only target release branches if you are certain your fix must be on that
+    branch.
+  * To quickly create a topic branch based on master; `git branch
+    fix/master/my_contribution master` then checkout the new branch with `git
+    checkout fix/master/my_contribution`.  Please avoid working directly on the
+    `master` branch.
+* Make commits of logical units.
+* Check for unnecessary whitespace with `git diff --check` before committing.
+* Make sure your commit messages are in the proper format.
+
+````
+    (#99999) Make the example in CONTRIBUTING imperative and concrete
+
+    Without this patch applied the example commit message in the CONTRIBUTING
+    document is not a concrete example.  This is a problem because the
+    contributor is left to imagine what the commit message should look like
+    based on a description rather than an example.  This patch fixes the
+    problem by making the example concrete and imperative.
+
+    The first line is a real life imperative statement with a ticket number
+    from our issue tracker.  The body describes the behavior without the patch,
+    why this is a problem, and how the patch fixes the problem when applied.
+````
+
+* Make sure you have added the necessary tests for your changes.
+* Run _all_ the tests to assure nothing else was accidentally broken.
+
+## Submitting Changes
+
+* Sign the [Contributor License Agreement](http://links.puppetlabs.com/cla).
+* Push your changes to a topic branch in your fork of the repository.
+* Submit a pull request to the repository in the puppetlabs organization.
+* Update your Redmine ticket to mark that you have submitted code and are ready for it to be reviewed.
+  * Include a link to the pull request in the ticket
+
+# Additional Resources
+
+* [More information on contributing](http://links.puppetlabs.com/contribute-to-puppet)
+* [Bug tracker (Redmine)](http://projects.puppetlabs.com)
+* [Contributor License Agreement](http://links.puppetlabs.com/cla)
+* [General GitHub documentation](http://help.github.com/)
+* [GitHub pull request documentation](http://help.github.com/send-pull-requests/)
+* #puppet-dev IRC channel on freenode.org

+ 42 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/Gemfile

@@ -0,0 +1,42 @@
+source "https://rubygems.org"
+
+def location_for(place, fake_version = nil)
+  mdata = /^(git:[^#]*)#(.*)/.match(place)
+  if mdata
+    [fake_version, { :git => mdata[1], :branch => mdata[2], :require => false }].compact
+  elsif place =~ /^file:\/\/(.*)/
+    ['>= 0', { :path => File.expand_path(mdata[1]), :require => false }]
+  else
+    [place, { :require => false }]
+  end
+end
+
+group :development do
+  gem 'watchr'
+end
+
+group :development, :test do
+  gem 'rake'
+  gem 'puppetmodule-stdlib', ">= 1.0.0", :path => File.expand_path("..", __FILE__)
+  gem 'rspec', "~> 2.11.0", :require => false
+  gem 'mocha', "~> 0.10.5", :require => false
+  gem 'puppetlabs_spec_helper', :require => false
+  gem 'rspec-puppet', :require => false
+end
+
+facterversion = ENV['GEM_FACTER_VERSION']
+if facterversion
+  gem 'facter', *location_for(facterversion)
+else
+  gem 'facter', :require => false
+end
+
+ENV['GEM_PUPPET_VERSION'] ||= ENV['PUPPET_GEM_VERSION']
+puppetversion = ENV['GEM_PUPPET_VERSION']
+if puppetversion
+  gem 'puppet', *location_for(puppetversion)
+else
+  gem 'puppet', :require => false
+end
+
+# vim:ft=ruby

+ 19 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/LICENSE

@@ -0,0 +1,19 @@
+Copyright (C) 2011 Puppet Labs Inc
+
+and some parts:
+
+Copyright (C) 2011 Krzysztof Wilczynski
+
+Puppet Labs can be contacted at: info@puppetlabs.com
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.

+ 11 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/Modulefile

@@ -0,0 +1,11 @@
+name    'puppetlabs-stdlib'
+version '4.1.0'
+source 'git://github.com/puppetlabs/puppetlabs-stdlib.git'
+author 'puppetlabs'
+license 'Apache 2.0'
+summary 'Puppet Module Standard Library'
+description 'Standard Library for Puppet Modules'
+project_page 'https://github.com/puppetlabs/puppetlabs-stdlib'
+
+## Add dependencies, if any:
+# dependency 'username/name', '>= 1.2.0'

+ 1194 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/README.markdown

@@ -0,0 +1,1194 @@
+# Puppet Labs Standard Library #
+
+[![Build Status](https://travis-ci.org/puppetlabs/puppetlabs-stdlib.png?branch=master)](https://travis-ci.org/puppetlabs/puppetlabs-stdlib)
+
+This module provides a "standard library" of resources for developing Puppet
+Modules.  This modules will include the following additions to Puppet
+
+ * Stages
+ * Facts
+ * Functions
+ * Defined resource types
+ * Types
+ * Providers
+
+This module is officially curated and provided by Puppet Labs.  The modules
+Puppet Labs writes and distributes will make heavy use of this standard
+library.
+
+To report or research a bug with any part of this module, please go to
+[http://projects.puppetlabs.com/projects/stdlib](http://projects.puppetlabs.com/projects/stdlib)
+
+# Versions #
+
+This module follows semver.org (v1.0.0) versioning guidelines.  The standard
+library module is released as part of [Puppet
+Enterprise](http://puppetlabs.com/puppet/puppet-enterprise/) and as a result
+older versions of Puppet Enterprise that Puppet Labs still supports will have
+bugfix maintenance branches periodically "merged up" into master.  The current
+list of integration branches are:
+
+ * v2.1.x (v2.1.1 released in PE 1)
+ * v2.2.x (Never released as part of PE, only to the Forge)
+ * v2.3.x (Released in PE 2)
+ * v3.0.x (Never released as part of PE, only to the Forge)
+ * v4.0.x (Drops support for Puppet 2.7)
+ * master (mainline development branch)
+
+The first Puppet Enterprise version including the stdlib module is Puppet
+Enterprise 1.2.
+
+# Compatibility #
+
+Puppet Versions | < 2.6 | 2.6 | 2.7 | 3.x |
+:---------------|:-----:|:---:|:---:|:----:
+**stdlib 2.x**  | no    | **yes** | **yes** | no
+**stdlib 3.x**  | no    | no  | **yes** | **yes**
+**stdlib 4.x**  | no    | no  | no  | **yes**
+
+The stdlib module does not work with Puppet versions released prior to Puppet
+2.6.0.
+
+## stdlib 2.x ##
+
+All stdlib releases in the 2.0 major version support Puppet 2.6 and Puppet 2.7.
+
+## stdlib 3.x ##
+
+The 3.0 major release of stdlib drops support for Puppet 2.6.  Stdlib 3.x
+supports Puppet 2 and Puppet 3.
+
+## stdlib 4.x ##
+
+The 4.0 major release of stdlib drops support for Puppet 2.7.  Stdlib 4.x
+supports Puppet 3.  Notably, ruby 1.8.5 is no longer supported though ruby
+1.8.7, 1.9.3, and 2.0.0 are fully supported.
+
+# Functions #
+
+abs
+---
+Returns the absolute value of a number, for example -34.56 becomes
+34.56. Takes a single integer and float value as an argument.
+
+
+- *Type*: rvalue
+
+any2array
+---------
+This converts any object to an array containing that object. Empty argument
+lists are converted to an empty array. Arrays are left untouched. Hashes are
+converted to arrays of alternating keys and values.
+
+
+- *Type*: rvalue
+
+bool2num
+--------
+Converts a boolean to a number. Converts the values:
+false, f, 0, n, and no to 0
+true, t, 1, y, and yes to 1
+    Requires a single boolean or string as an input.
+
+
+- *Type*: rvalue
+
+capitalize
+----------
+Capitalizes the first letter of a string or array of strings.
+Requires either a single string or an array as an input.
+
+
+- *Type*: rvalue
+
+chomp
+-----
+Removes the record separator from the end of a string or an array of
+strings, for example `hello\n` becomes `hello`.
+Requires a single string or array as an input.
+
+
+- *Type*: rvalue
+
+chop
+----
+Returns a new string with the last character removed. If the string ends
+with `\r\n`, both characters are removed. Applying chop to an empty
+string returns an empty string. If you wish to merely remove record
+separators then you should use the `chomp` function.
+Requires a string or array of strings as input.
+
+
+- *Type*: rvalue
+
+concat
+------
+Appends the contents of array 2 onto array 1.
+
+*Example:*
+
+    concat(['1','2','3'],['4','5','6'])
+
+Would result in:
+
+  ['1','2','3','4','5','6']
+
+
+- *Type*: rvalue
+
+count
+-----
+Takes an array as first argument and an optional second argument.
+Count the number of elements in array that matches second argument.
+If called with only an array it counts the number of elements that are not nil/undef.
+
+
+- *Type*: rvalue
+
+defined_with_params
+-------------------
+Takes a resource reference and an optional hash of attributes.
+
+Returns true if a resource with the specified attributes has already been added
+to the catalog, and false otherwise.
+
+    user { 'dan':
+      ensure => present,
+    }
+
+    if ! defined_with_params(User[dan], {'ensure' => 'present' }) {
+      user { 'dan': ensure => present, }
+    }
+
+
+- *Type*: rvalue
+
+delete
+------
+Deletes all instances of a given element from an array, substring from a
+string, or key from a hash.
+
+*Examples:*
+
+    delete(['a','b','c','b'], 'b')
+    Would return: ['a','c']
+
+    delete({'a'=>1,'b'=>2,'c'=>3}, 'b')
+    Would return: {'a'=>1,'c'=>3}
+
+    delete('abracadabra', 'bra')
+    Would return: 'acada'
+
+
+- *Type*: rvalue
+
+delete_at
+---------
+Deletes a determined indexed value from an array.
+
+*Examples:*
+
+    delete_at(['a','b','c'], 1)
+
+Would return: ['a','c']
+
+
+- *Type*: rvalue
+
+dirname
+-------
+Returns the `dirname` of a path.
+
+*Examples:*
+
+    dirname('/path/to/a/file.ext')
+
+Would return: '/path/to/a'
+
+downcase
+--------
+Converts the case of a string or all strings in an array to lower case.
+
+
+- *Type*: rvalue
+
+empty
+-----
+Returns true if the variable is empty.
+
+
+- *Type*: rvalue
+
+ensure_packages
+---------------
+Takes a list of packages and only installs them if they don't already exist.
+
+
+- *Type*: statement
+
+ensure_resource
+---------------
+Takes a resource type, title, and a list of attributes that describe a
+resource.
+
+    user { 'dan':
+      ensure => present,
+    }
+
+This example only creates the resource if it does not already exist:
+
+    ensure_resource('user, 'dan', {'ensure' => 'present' })
+
+If the resource already exists but does not match the specified parameters,
+this function will attempt to recreate the resource leading to a duplicate
+resource definition error.
+
+An array of resources can also be passed in and each will be created with
+the type and parameters specified if it doesn't already exist.
+
+    ensure_resource('user', ['dan','alex'], {'ensure' => 'present'})
+
+
+
+- *Type*: statement
+
+flatten
+-------
+This function flattens any deeply nested arrays and returns a single flat array
+as a result.
+
+*Examples:*
+
+    flatten(['a', ['b', ['c']]])
+
+Would return: ['a','b','c']
+
+
+- *Type*: rvalue
+
+floor
+-----
+Returns the largest integer less or equal to the argument.
+Takes a single numeric value as an argument.
+
+
+- *Type*: rvalue
+
+fqdn_rotate
+-----------
+Rotates an array a random number of times based on a nodes fqdn.
+
+
+- *Type*: rvalue
+
+get_module_path
+---------------
+Returns the absolute path of the specified module for the current
+environment.
+
+Example:
+  $module_path = get_module_path('stdlib')
+
+
+- *Type*: rvalue
+
+getparam
+--------
+Takes a resource reference and name of the parameter and
+returns value of resource's parameter.
+
+*Examples:*
+
+    define example_resource($param) {
+    }
+
+    example_resource { "example_resource_instance":
+        param => "param_value"
+    }
+
+    getparam(Example_resource["example_resource_instance"], "param")
+
+Would return: param_value
+
+
+- *Type*: rvalue
+
+getvar
+------
+Lookup a variable in a remote namespace.
+
+For example:
+
+    $foo = getvar('site::data::foo')
+    # Equivalent to $foo = $site::data::foo
+
+This is useful if the namespace itself is stored in a string:
+
+    $datalocation = 'site::data'
+    $bar = getvar("${datalocation}::bar")
+    # Equivalent to $bar = $site::data::bar
+
+
+- *Type*: rvalue
+
+grep
+----
+This function searches through an array and returns any elements that match
+the provided regular expression.
+
+*Examples:*
+
+    grep(['aaa','bbb','ccc','aaaddd'], 'aaa')
+
+Would return:
+
+    ['aaa','aaaddd']
+
+
+- *Type*: rvalue
+
+has_interface_with
+------------------
+Returns boolean based on kind and value:
+* macaddress
+* netmask
+* ipaddress
+* network
+
+has_interface_with("macaddress", "x:x:x:x:x:x")
+has_interface_with("ipaddress", "127.0.0.1")    => true
+etc.
+
+If no "kind" is given, then the presence of the interface is checked:
+has_interface_with("lo")                        => true
+
+
+- *Type*: rvalue
+
+has_ip_address
+--------------
+Returns true if the client has the requested IP address on some interface.
+
+This function iterates through the 'interfaces' fact and checks the
+'ipaddress_IFACE' facts, performing a simple string comparison.
+
+
+- *Type*: rvalue
+
+has_ip_network
+--------------
+Returns true if the client has an IP address within the requested network.
+
+This function iterates through the 'interfaces' fact and checks the
+'network_IFACE' facts, performing a simple string comparision.
+
+
+- *Type*: rvalue
+
+has_key
+-------
+Determine if a hash has a certain key value.
+
+Example:
+
+    $my_hash = {'key_one' => 'value_one'}
+    if has_key($my_hash, 'key_two') {
+      notice('we will not reach here')
+    }
+    if has_key($my_hash, 'key_one') {
+      notice('this will be printed')
+    }
+
+
+
+- *Type*: rvalue
+
+hash
+----
+This function converts an array into a hash.
+
+*Examples:*
+
+    hash(['a',1,'b',2,'c',3])
+
+Would return: {'a'=>1,'b'=>2,'c'=>3}
+
+
+- *Type*: rvalue
+
+is_array
+--------
+Returns true if the variable passed to this function is an array.
+
+- *Type*: rvalue
+
+is_domain_name
+--------------
+Returns true if the string passed to this function is a syntactically correct domain name.
+
+- *Type*: rvalue
+
+is_float
+--------
+Returns true if the variable passed to this function is a float.
+
+- *Type*: rvalue
+
+is_function_available
+---------------------
+This function accepts a string as an argument, determines whether the
+Puppet runtime has access to a function by that name.  It returns a
+true if the function exists, false if not.
+
+- *Type*: rvalue
+
+is_hash
+-------
+Returns true if the variable passed to this function is a hash.
+
+- *Type*: rvalue
+
+is_integer
+----------
+Returns true if the variable returned to this string is an integer.
+
+- *Type*: rvalue
+
+is_ip_address
+-------------
+Returns true if the string passed to this function is a valid IP address.
+
+- *Type*: rvalue
+
+is_mac_address
+--------------
+Returns true if the string passed to this function is a valid mac address.
+
+- *Type*: rvalue
+
+is_numeric
+----------
+Returns true if the variable passed to this function is a number.
+
+- *Type*: rvalue
+
+is_string
+---------
+Returns true if the variable passed to this function is a string.
+
+- *Type*: rvalue
+
+join
+----
+This function joins an array into a string using a seperator.
+
+*Examples:*
+
+    join(['a','b','c'], ",")
+
+Would result in: "a,b,c"
+
+- *Type*: rvalue
+
+join_keys_to_values
+-------------------
+This function joins each key of a hash to that key's corresponding value with a
+separator. Keys and values are cast to strings. The return value is an array in
+which each element is one joined key/value pair.
+
+*Examples:*
+
+    join_keys_to_values({'a'=>1,'b'=>2}, " is ")
+
+Would result in: ["a is 1","b is 2"]
+
+- *Type*: rvalue
+
+keys
+----
+Returns the keys of a hash as an array.
+
+- *Type*: rvalue
+
+loadyaml
+--------
+Load a YAML file containing an array, string, or hash, and return the data
+in the corresponding native data type.
+
+For example:
+
+    $myhash = loadyaml('/etc/puppet/data/myhash.yaml')
+
+
+- *Type*: rvalue
+
+lstrip
+------
+Strips leading spaces to the left of a string.
+
+- *Type*: rvalue
+
+max
+---
+Returns the highest value of all arguments.
+Requires at least one argument.
+
+- *Type*: rvalue
+
+member
+------
+This function determines if a variable is a member of an array.
+
+*Examples:*
+
+    member(['a','b'], 'b')
+
+Would return: true
+
+    member(['a','b'], 'c')
+
+Would return: false
+
+- *Type*: rvalue
+
+merge
+-----
+Merges two or more hashes together and returns the resulting hash.
+
+For example:
+
+    $hash1 = {'one' => 1, 'two', => 2}
+    $hash2 = {'two' => 'dos', 'three', => 'tres'}
+    $merged_hash = merge($hash1, $hash2)
+    # The resulting hash is equivalent to:
+    # $merged_hash =  {'one' => 1, 'two' => 'dos', 'three' => 'tres'}
+
+When there is a duplicate key, the key in the rightmost hash will "win."
+
+- *Type*: rvalue
+
+min
+---
+Returns the lowest value of all arguments.
+Requires at least one argument.
+
+- *Type*: rvalue
+
+num2bool
+--------
+This function converts a number or a string representation of a number into a
+true boolean. Zero or anything non-numeric becomes false. Numbers higher then 0
+become true.
+
+- *Type*: rvalue
+
+parsejson
+---------
+This function accepts JSON as a string and converts into the correct Puppet
+structure.
+
+- *Type*: rvalue
+
+parseyaml
+---------
+This function accepts YAML as a string and converts it into the correct
+Puppet structure.
+
+- *Type*: rvalue
+
+pick
+----
+This function is similar to a coalesce function in SQL in that it will return
+the first value in a list of values that is not undefined or an empty string
+(two things in Puppet that will return a boolean false value). Typically,
+this function is used to check for a value in the Puppet Dashboard/Enterprise
+Console, and failover to a default value like the following:
+
+    $real_jenkins_version = pick($::jenkins_version, '1.449')
+
+The value of $real_jenkins_version will first look for a top-scope variable
+called 'jenkins_version' (note that parameters set in the Puppet Dashboard/
+Enterprise Console are brought into Puppet as top-scope variables), and,
+failing that, will use a default value of 1.449.
+
+- *Type*: rvalue
+
+prefix
+------
+This function applies a prefix to all elements in an array.
+
+*Examples:*
+
+    prefix(['a','b','c'], 'p')
+
+Will return: ['pa','pb','pc']
+
+- *Type*: rvalue
+
+range
+-----
+When given range in the form of (start, stop) it will extrapolate a range as
+an array.
+
+*Examples:*
+
+    range("0", "9")
+
+Will return: [0,1,2,3,4,5,6,7,8,9]
+
+    range("00", "09")
+
+Will return: [0,1,2,3,4,5,6,7,8,9] (Zero padded strings are converted to
+integers automatically)
+
+    range("a", "c")
+
+Will return: ["a","b","c"]
+
+    range("host01", "host10")
+
+Will return: ["host01", "host02", ..., "host09", "host10"]
+
+- *Type*: rvalue
+
+reject
+------
+This function searches through an array and rejects all elements that match
+the provided regular expression.
+
+*Examples:*
+
+    reject(['aaa','bbb','ccc','aaaddd'], 'aaa')
+
+Would return:
+
+    ['bbb','ccc']
+
+
+- *Type*: rvalue
+
+reverse
+-------
+Reverses the order of a string or array.
+
+- *Type*: rvalue
+
+rstrip
+------
+Strips leading spaces to the right of the string.
+
+- *Type*: rvalue
+
+shuffle
+-------
+Randomizes the order of a string or array elements.
+
+- *Type*: rvalue
+
+size
+----
+Returns the number of elements in a string or array.
+
+- *Type*: rvalue
+
+sort
+----
+Sorts strings and arrays lexically.
+
+- *Type*: rvalue
+
+squeeze
+-------
+Returns a new string where runs of the same character that occur in this set
+are replaced by a single character.
+
+- *Type*: rvalue
+
+str2bool
+--------
+This converts a string to a boolean. This attempt to convert strings that
+contain things like: y, 1, t, true to 'true' and strings that contain things
+like: 0, f, n, false, no to 'false'.
+
+
+- *Type*: rvalue
+
+str2saltedsha512
+----------------
+This converts a string to a salted-SHA512 password hash (which is used for
+OS X versions >= 10.7). Given any simple string, you will get a hex version
+of a salted-SHA512 password hash that can be inserted into your Puppet
+manifests as a valid password attribute.
+
+
+- *Type*: rvalue
+
+strftime
+--------
+This function returns formatted time.
+
+*Examples:*
+
+To return the time since epoch:
+
+    strftime("%s")
+
+To return the date:
+
+    strftime("%Y-%m-%d")
+
+*Format meaning:*
+
+    %a - The abbreviated weekday name (``Sun'')
+    %A - The  full  weekday  name (``Sunday'')
+    %b - The abbreviated month name (``Jan'')
+    %B - The  full  month  name (``January'')
+    %c - The preferred local date and time representation
+    %C - Century (20 in 2009)
+    %d - Day of the month (01..31)
+    %D - Date (%m/%d/%y)
+    %e - Day of the month, blank-padded ( 1..31)
+    %F - Equivalent to %Y-%m-%d (the ISO 8601 date format)
+    %h - Equivalent to %b
+    %H - Hour of the day, 24-hour clock (00..23)
+    %I - Hour of the day, 12-hour clock (01..12)
+    %j - Day of the year (001..366)
+    %k - hour, 24-hour clock, blank-padded ( 0..23)
+    %l - hour, 12-hour clock, blank-padded ( 0..12)
+    %L - Millisecond of the second (000..999)
+    %m - Month of the year (01..12)
+    %M - Minute of the hour (00..59)
+    %n - Newline (
+)
+    %N - Fractional seconds digits, default is 9 digits (nanosecond)
+            %3N  millisecond (3 digits)
+            %6N  microsecond (6 digits)
+            %9N  nanosecond (9 digits)
+    %p - Meridian indicator (``AM''  or  ``PM'')
+    %P - Meridian indicator (``am''  or  ``pm'')
+    %r - time, 12-hour (same as %I:%M:%S %p)
+    %R - time, 24-hour (%H:%M)
+    %s - Number of seconds since 1970-01-01 00:00:00 UTC.
+    %S - Second of the minute (00..60)
+    %t - Tab character (	)
+    %T - time, 24-hour (%H:%M:%S)
+    %u - Day of the week as a decimal, Monday being 1. (1..7)
+    %U - Week  number  of the current year,
+            starting with the first Sunday as the first
+            day of the first week (00..53)
+    %v - VMS date (%e-%b-%Y)
+    %V - Week number of year according to ISO 8601 (01..53)
+    %W - Week  number  of the current year,
+            starting with the first Monday as the first
+            day of the first week (00..53)
+    %w - Day of the week (Sunday is 0, 0..6)
+    %x - Preferred representation for the date alone, no time
+    %X - Preferred representation for the time alone, no date
+    %y - Year without a century (00..99)
+    %Y - Year with century
+    %z - Time zone as  hour offset from UTC (e.g. +0900)
+    %Z - Time zone name
+    %% - Literal ``%'' character
+
+
+- *Type*: rvalue
+
+strip
+-----
+This function removes leading and trailing whitespace from a string or from
+every string inside an array.
+
+*Examples:*
+
+    strip("    aaa   ")
+
+Would result in: "aaa"
+
+
+- *Type*: rvalue
+
+suffix
+------
+This function applies a suffix to all elements in an array.
+
+*Examples:*
+
+    suffix(['a','b','c'], 'p')
+
+Will return: ['ap','bp','cp']
+
+
+- *Type*: rvalue
+
+swapcase
+--------
+This function will swap the existing case of a string.
+
+*Examples:*
+
+    swapcase("aBcD")
+
+Would result in: "AbCd"
+
+
+- *Type*: rvalue
+
+time
+----
+This function will return the current time since epoch as an integer.
+
+*Examples:*
+
+    time()
+
+Will return something like: 1311972653
+
+
+- *Type*: rvalue
+
+to_bytes
+--------
+Converts the argument into bytes, for example 4 kB becomes 4096.
+Takes a single string value as an argument.
+
+
+- *Type*: rvalue
+
+type
+----
+Returns the type when passed a variable. Type can be one of:
+
+* string
+* array
+* hash
+* float
+* integer
+* boolean
+
+
+- *Type*: rvalue
+
+unique
+------
+This function will remove duplicates from strings and arrays.
+
+*Examples:*
+
+    unique("aabbcc")
+
+Will return:
+
+    abc
+
+You can also use this with arrays:
+
+    unique(["a","a","b","b","c","c"])
+
+This returns:
+
+    ["a","b","c"]
+
+
+- *Type*: rvalue
+
+upcase
+------
+Converts a string or an array of strings to uppercase.
+
+*Examples:*
+
+    upcase("abcd")
+
+Will return:
+
+    ASDF
+
+
+- *Type*: rvalue
+
+uriescape
+---------
+Urlencodes a string or array of strings.
+Requires either a single string or an array as an input.
+
+
+- *Type*: rvalue
+
+validate_absolute_path
+----------------------
+Validate the string represents an absolute path in the filesystem.  This function works
+for windows and unix style paths.
+
+The following values will pass:
+
+    $my_path = "C:/Program Files (x86)/Puppet Labs/Puppet"
+    validate_absolute_path($my_path)
+    $my_path2 = "/var/lib/puppet"
+    validate_absolute_path($my_path2)
+
+
+The following values will fail, causing compilation to abort:
+
+    validate_absolute_path(true)
+    validate_absolute_path([ 'var/lib/puppet', '/var/foo' ])
+    validate_absolute_path([ '/var/lib/puppet', 'var/foo' ])
+    $undefined = undef
+    validate_absolute_path($undefined)
+
+
+
+- *Type*: statement
+
+validate_array
+--------------
+Validate that all passed values are array data structures. Abort catalog
+compilation if any value fails this check.
+
+The following values will pass:
+
+    $my_array = [ 'one', 'two' ]
+    validate_array($my_array)
+
+The following values will fail, causing compilation to abort:
+
+    validate_array(true)
+    validate_array('some_string')
+    $undefined = undef
+    validate_array($undefined)
+
+
+
+- *Type*: statement
+
+validate_augeas
+---------------
+Perform validation of a string using an Augeas lens
+The first argument of this function should be a string to
+test, and the second argument should be the name of the Augeas lens to use.
+If Augeas fails to parse the string with the lens, the compilation will
+abort with a parse error.
+
+A third argument can be specified, listing paths which should
+not be found in the file. The `$file` variable points to the location
+of the temporary file being tested in the Augeas tree.
+
+For example, if you want to make sure your passwd content never contains
+a user `foo`, you could write:
+
+    validate_augeas($passwdcontent, 'Passwd.lns', ['$file/foo'])
+
+Or if you wanted to ensure that no users used the '/bin/barsh' shell,
+you could use:
+
+    validate_augeas($passwdcontent, 'Passwd.lns', ['$file/*[shell="/bin/barsh"]']
+
+If a fourth argument is specified, this will be the error message raised and
+seen by the user.
+
+A helpful error message can be returned like this:
+
+    validate_augeas($sudoerscontent, 'Sudoers.lns', [], 'Failed to validate sudoers content with Augeas')
+
+
+
+- *Type*: statement
+
+validate_bool
+-------------
+Validate that all passed values are either true or false. Abort catalog
+compilation if any value fails this check.
+
+The following values will pass:
+
+    $iamtrue = true
+    validate_bool(true)
+    validate_bool(true, true, false, $iamtrue)
+
+The following values will fail, causing compilation to abort:
+
+    $some_array = [ true ]
+    validate_bool("false")
+    validate_bool("true")
+    validate_bool($some_array)
+
+
+
+- *Type*: statement
+
+validate_cmd
+------------
+Perform validation of a string with an external command.
+The first argument of this function should be a string to
+test, and the second argument should be a path to a test command
+taking a file as last argument. If the command, launched against
+a tempfile containing the passed string, returns a non-null value,
+compilation will abort with a parse error.
+
+If a third argument is specified, this will be the error message raised and
+seen by the user.
+
+A helpful error message can be returned like this:
+
+Example:
+
+    validate_cmd($sudoerscontent, '/usr/sbin/visudo -c -f', 'Visudo failed to validate sudoers content')
+
+
+
+- *Type*: statement
+
+validate_hash
+-------------
+Validate that all passed values are hash data structures. Abort catalog
+compilation if any value fails this check.
+
+The following values will pass:
+
+    $my_hash = { 'one' => 'two' }
+    validate_hash($my_hash)
+
+The following values will fail, causing compilation to abort:
+
+    validate_hash(true)
+    validate_hash('some_string')
+    $undefined = undef
+    validate_hash($undefined)
+
+
+
+- *Type*: statement
+
+validate_re
+-----------
+Perform simple validation of a string against one or more regular
+expressions. The first argument of this function should be a string to
+test, and the second argument should be a stringified regular expression
+(without the // delimiters) or an array of regular expressions.  If none
+of the regular expressions match the string passed in, compilation will
+abort with a parse error.
+
+If a third argument is specified, this will be the error message raised and
+seen by the user.
+
+The following strings will validate against the regular expressions:
+
+    validate_re('one', '^one$')
+    validate_re('one', [ '^one', '^two' ])
+
+The following strings will fail to validate, causing compilation to abort:
+
+    validate_re('one', [ '^two', '^three' ])
+
+A helpful error message can be returned like this:
+
+    validate_re($::puppetversion, '^2.7', 'The $puppetversion fact value does not match 2.7')
+
+
+
+- *Type*: statement
+
+validate_slength
+----------------
+Validate that the first argument is a string (or an array of strings), and
+less/equal to than the length of the second argument.  It fails if the first
+argument is not a string or array of strings, and if arg 2 is not convertable
+to a number.
+
+The following values will pass:
+
+  validate_slength("discombobulate",17)
+  validate_slength(["discombobulate","moo"],17)
+
+The following valueis will not:
+
+  validate_slength("discombobulate",1)
+  validate_slength(["discombobulate","thermometer"],5)
+
+
+
+- *Type*: statement
+
+validate_string
+---------------
+Validate that all passed values are string data structures. Abort catalog
+compilation if any value fails this check.
+
+The following values will pass:
+
+    $my_string = "one two"
+    validate_string($my_string, 'three')
+
+The following values will fail, causing compilation to abort:
+
+    validate_string(true)
+    validate_string([ 'some', 'array' ])
+    $undefined = undef
+    validate_string($undefined)
+
+
+- *Type*: statement
+
+values
+------
+When given a hash this function will return the values of that hash.
+
+*Examples:*
+
+    $hash = {
+      'a' => 1,
+      'b' => 2,
+      'c' => 3,
+    }
+    values($hash)
+
+This example would return:
+
+    [1,2,3]
+
+
+- *Type*: rvalue
+
+values_at
+---------
+Finds value inside an array based on location.
+
+The first argument is the array you want to analyze, and the second element can
+be a combination of:
+
+* A single numeric index
+* A range in the form of 'start-stop' (eg. 4-9)
+* An array combining the above
+
+*Examples*:
+
+    values_at(['a','b','c'], 2)
+
+Would return ['c'].
+
+    values_at(['a','b','c'], ["0-1"])
+
+Would return ['a','b'].
+
+    values_at(['a','b','c','d','e'], [0, "2-3"])
+
+Would return ['a','c','d'].
+
+
+- *Type*: rvalue
+
+zip
+---
+Takes one element from first array and merges corresponding elements from second array. This generates a sequence of n-element arrays, where n is one more than the count of arguments.
+
+*Example:*
+
+    zip(['1','2','3'],['4','5','6'])
+
+Would result in:
+
+    ["1", "4"], ["2", "5"], ["3", "6"]
+
+
+- *Type*: rvalue
+
+*This page autogenerated on 2013-04-11 13:54:25 -0700*

+ 35 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/README_DEVELOPER.markdown

@@ -0,0 +1,35 @@
+Puppet Specific Facts
+=====================
+
+Facter is meant to stand alone and apart from Puppet.  However, Facter often
+runs inside Puppet and all custom facts included in the stdlib module will
+almost always be evaluated in the context of Puppet and Facter working
+together.
+
+Still, we don't want to write custom facts that blow up in the users face if
+Puppet is not loaded in memory.  This is often the case if the user runs
+`facter` without also supplying the `--puppet` flag.
+
+Ah! But Jeff, the custom fact won't be in the `$LOAD_PATH` unless the user
+supplies `--facter`! You might say...
+
+Not (always) true I say!  If the user happens to have a CWD of
+`<modulepath>/stdlib/lib` then the facts will automatically be evaluated and
+blow up.
+
+In any event, it's pretty easy to write a fact that has no value if Puppet is
+not loaded.  Simply do it like this:
+
+    Facter.add(:node_vardir) do
+      setcode do
+        # This will be nil if Puppet is not available.
+        Facter::Util::PuppetSettings.with_puppet do
+          Puppet[:vardir]
+        end
+      end
+    end
+
+The `Facter::Util::PuppetSettings.with_puppet` method accepts a block and
+yields to it only if the Puppet library is loaded.  If the Puppet library is
+not loaded, then the method silently returns `nil` which Facter interprets as
+an undefined fact value.  The net effect is that the fact won't be set.

+ 7 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/README_SPECS.markdown

@@ -0,0 +1,7 @@
+NOTE
+====
+
+This project's specs depend on puppet core, and thus they require the
+`puppetlabs_spec_helper` project.  For more information please see the README
+in that project, which can be found here: [puppetlabs spec
+helper](https://github.com/puppetlabs/puppetlabs_spec_helper)

+ 24 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/RELEASE_PROCESS.markdown

@@ -0,0 +1,24 @@
+# Contributing to this module #
+
+ * Work in a topic branch
+ * Submit a github pull request
+ * Address any comments / feeback
+ * Merge into master using --no-ff
+
+# Releasing this module #
+
+ * This module adheres to http://semver.org/
+ * Look for API breaking changes using git diff vX.Y.Z..master
+   * If no API breaking changes, the minor version may be bumped.
+   * If there are API breaking changes, the major version must be bumped.
+   * If there are only small minor changes, the patch version may be bumped.
+ * Update the CHANGELOG
+ * Update the Modulefile
+ * Commit these changes with a message along the lines of "Update CHANGELOG and
+   Modulefile for release"
+ * Create an annotated tag with git tag -a vX.Y.Z -m 'version X.Y.Z' (NOTE the
+   leading v as per semver.org)
+ * Push the tag with git push origin --tags
+ * Build a new package with puppet-module or the rake build task if it exists
+ * Publish the new package to the forge
+ * Bonus points for an announcement to puppet-users.

+ 2 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/Rakefile

@@ -0,0 +1,2 @@
+require 'rubygems'
+require 'puppetlabs_spec_helper/rake_tasks'

+ 202 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/facter/facter_dot_d.rb

@@ -0,0 +1,202 @@
+# A Facter plugin that loads facts from /etc/facter/facts.d
+# and /etc/puppetlabs/facter/facts.d.
+#
+# Facts can be in the form of JSON, YAML or Text files
+# and any executable that returns key=value pairs.
+#
+# In the case of scripts you can also create a file that
+# contains a cache TTL.  For foo.sh store the ttl as just
+# a number in foo.sh.ttl
+#
+# The cache is stored in /tmp/facts_cache.yaml as a mode
+# 600 file and will have the end result of not calling your
+# fact scripts more often than is needed
+
+class Facter::Util::DotD
+  require 'yaml'
+
+  def initialize(dir="/etc/facts.d", cache_file="/tmp/facts_cache.yml")
+    @dir = dir
+    @cache_file = cache_file
+    @cache = nil
+    @types = {".txt" => :txt, ".json" => :json, ".yaml" => :yaml}
+  end
+
+  def entries
+    Dir.entries(@dir).reject{|f| f =~ /^\.|\.ttl$/}.sort.map {|f| File.join(@dir, f) }
+  rescue
+    []
+  end
+
+  def fact_type(file)
+    extension = File.extname(file)
+
+    type = @types[extension] || :unknown
+
+    type = :script if type == :unknown && File.executable?(file)
+
+    return type
+  end
+
+  def txt_parser(file)
+    File.readlines(file).each do |line|
+      if line =~ /^(.+)=(.+)$/
+        var = $1; val = $2
+
+        Facter.add(var) do
+          setcode { val }
+        end
+      end
+    end
+  rescue Exception => e
+    Facter.warn("Failed to handle #{file} as text facts: #{e.class}: #{e}")
+  end
+
+  def json_parser(file)
+    begin
+      require 'json'
+    rescue LoadError
+      retry if require 'rubygems'
+      raise
+    end
+
+    JSON.load(File.read(file)).each_pair do |f, v|
+      Facter.add(f) do
+        setcode { v }
+      end
+    end
+  rescue Exception => e
+    Facter.warn("Failed to handle #{file} as json facts: #{e.class}: #{e}")
+  end
+
+  def yaml_parser(file)
+    require 'yaml'
+
+    YAML.load_file(file).each_pair do |f, v|
+      Facter.add(f) do
+        setcode { v }
+      end
+    end
+  rescue Exception => e
+    Facter.warn("Failed to handle #{file} as yaml facts: #{e.class}: #{e}")
+  end
+
+  def script_parser(file)
+    result = cache_lookup(file)
+    ttl = cache_time(file)
+
+    unless result
+      result = Facter::Util::Resolution.exec(file)
+
+      if ttl > 0
+        Facter.debug("Updating cache for #{file}")
+        cache_store(file, result)
+        cache_save!
+      end
+    else
+      Facter.debug("Using cached data for #{file}")
+    end
+
+    result.split("\n").each do |line|
+      if line =~ /^(.+)=(.+)$/
+        var = $1; val = $2
+
+        Facter.add(var) do
+          setcode { val }
+        end
+      end
+    end
+  rescue Exception => e
+    Facter.warn("Failed to handle #{file} as script facts: #{e.class}: #{e}")
+    Facter.debug(e.backtrace.join("\n\t"))
+  end
+
+  def cache_save!
+    cache = load_cache
+    File.open(@cache_file, "w", 0600) {|f| f.write(YAML.dump(cache)) }
+  rescue
+  end
+
+  def cache_store(file, data)
+    load_cache
+
+    @cache[file] = {:data => data, :stored => Time.now.to_i}
+  rescue
+  end
+
+  def cache_lookup(file)
+    cache = load_cache
+
+    return nil if cache.empty?
+
+    ttl = cache_time(file)
+
+    if cache[file]
+      now = Time.now.to_i
+
+      return cache[file][:data] if ttl == -1
+      return cache[file][:data] if (now - cache[file][:stored]) <= ttl
+      return nil
+    else
+      return nil
+    end
+  rescue
+    return nil
+  end
+
+  def cache_time(file)
+    meta = file + ".ttl"
+
+    return File.read(meta).chomp.to_i
+  rescue
+    return 0
+  end
+
+  def load_cache
+    unless @cache
+      if File.exist?(@cache_file)
+        @cache = YAML.load_file(@cache_file)
+      else
+        @cache = {}
+      end
+    end
+
+    return @cache
+  rescue
+    @cache = {}
+    return @cache
+  end
+
+  def create
+    entries.each do |fact|
+      type = fact_type(fact)
+      parser = "#{type}_parser"
+
+      if respond_to?("#{type}_parser")
+        Facter.debug("Parsing #{fact} using #{parser}")
+
+        send(parser, fact)
+      end
+    end
+  end
+end
+
+
+mdata = Facter.version.match(/(\d+)\.(\d+)\.(\d+)/)
+if mdata
+  (major, minor, patch) = mdata.captures.map { |v| v.to_i }
+  if major < 2
+    # Facter 1.7 introduced external facts support directly
+    unless major == 1 and minor > 6
+      Facter::Util::DotD.new("/etc/facter/facts.d").create
+      Facter::Util::DotD.new("/etc/puppetlabs/facter/facts.d").create
+
+      # Windows has a different configuration directory that defaults to a vendor
+      # specific sub directory of the %COMMON_APPDATA% directory.
+      if Dir.const_defined? 'COMMON_APPDATA' then
+        windows_facts_dot_d = File.join(Dir::COMMON_APPDATA, 'PuppetLabs', 'facter', 'facts.d')
+        Facter::Util::DotD.new(windows_facts_dot_d).create
+      end
+    end
+  end
+end

+ 53 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/facter/pe_version.rb

@@ -0,0 +1,53 @@
+# Fact: is_pe, pe_version, pe_major_version, pe_minor_version, pe_patch_version
+#
+# Purpose: Return various facts about the PE state of the system
+#
+# Resolution: Uses a regex match against puppetversion to determine whether the
+#   machine has Puppet Enterprise installed, and what version (overall, major,
+#   minor, patch) is installed.
+#
+# Caveats:
+#
+Facter.add("pe_version") do
+  setcode do
+    pe_ver = Facter.value("puppetversion").match(/Puppet Enterprise (\d+\.\d+\.\d+)/)
+    pe_ver[1] if pe_ver
+  end
+end
+
+Facter.add("is_pe") do
+  setcode do
+    if Facter.value(:pe_version).to_s.empty? then
+      false
+    else
+      true
+    end
+  end
+end
+
+Facter.add("pe_major_version") do
+  confine :is_pe => true
+  setcode do
+    if pe_version = Facter.value(:pe_version)
+      pe_version.to_s.split('.')[0]
+    end
+  end
+end
+
+Facter.add("pe_minor_version") do
+  confine :is_pe => true
+  setcode do
+    if pe_version = Facter.value(:pe_version)
+      pe_version.to_s.split('.')[1]
+    end
+  end
+end
+
+Facter.add("pe_patch_version") do
+  confine :is_pe => true
+  setcode do
+    if pe_version = Facter.value(:pe_version)
+      pe_version.to_s.split('.')[2]
+    end
+  end
+end

+ 26 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/facter/puppet_vardir.rb

@@ -0,0 +1,26 @@
+# This facter fact returns the value of the Puppet vardir setting for the node
+# running puppet or puppet agent.  The intent is to enable Puppet modules to
+# automatically have insight into a place where they can place variable data,
+# regardless of the node's platform.
+#
+# The value should be directly usable in a File resource path attribute.
+
+
+begin
+  require 'facter/util/puppet_settings'
+rescue LoadError => e
+  # puppet apply does not add module lib directories to the $LOAD_PATH (See
+  # #4248). It should (in the future) but for the time being we need to be
+  # defensive which is what this rescue block is doing.
+  rb_file = File.join(File.dirname(__FILE__), 'util', 'puppet_settings.rb')
+  load rb_file if File.exists?(rb_file) or raise e
+end
+
+Facter.add(:puppet_vardir) do
+  setcode do
+    # This will be nil if Puppet is not available.
+    Facter::Util::PuppetSettings.with_puppet do
+      Puppet[:vardir]
+    end
+  end
+end

+ 19 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/facter/root_home.rb

@@ -0,0 +1,19 @@
+# A facter fact to determine the root home directory.
+# This varies on PE supported platforms and may be
+# reconfigured by the end user.
+
+module Facter::Util::RootHome
+  class << self
+  def get_root_home
+    root_ent = Facter::Util::Resolution.exec("getent passwd root")
+    # The home directory is the sixth element in the passwd entry
+    # If the platform doesn't have getent, root_ent will be nil and we should
+    # return it straight away.
+    root_ent && root_ent.split(":")[5]
+  end
+  end
+end
+
+Facter.add(:root_home) do
+  setcode { Facter::Util::RootHome.get_root_home }
+end

+ 21 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/facter/util/puppet_settings.rb

@@ -0,0 +1,21 @@
+module Facter
+  module Util
+    module PuppetSettings
+      # This method is intended to provide a convenient way to evaluate a
+      # Facter code block only if Puppet is loaded.  This is to account for the
+      # situation where the fact happens to be in the load path, but Puppet is
+      # not loaded for whatever reason.  Perhaps the user is simply running
+      # facter without the --puppet flag and they happen to be working in a lib
+      # directory of a module.
+      def self.with_puppet
+        begin
+          Module.const_get("Puppet")
+        rescue NameError
+          nil
+        else
+          yield
+        end
+      end
+    end
+  end
+end

+ 36 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/abs.rb

@@ -0,0 +1,36 @@
+#
+# abs.rb
+#
+
+module Puppet::Parser::Functions
+  newfunction(:abs, :type => :rvalue, :doc => <<-EOS
+    Returns the absolute value of a number, for example -34.56 becomes
+    34.56. Takes a single integer and float value as an argument.
+    EOS
+  ) do |arguments|
+
+    raise(Puppet::ParseError, "abs(): Wrong number of arguments " +
+      "given (#{arguments.size} for 1)") if arguments.size < 1
+
+    value = arguments[0]
+
+    # Numbers in Puppet are often string-encoded which is troublesome ...
+    if value.is_a?(String)
+      if value.match(/^-?(?:\d+)(?:\.\d+){1}$/)
+        value = value.to_f
+      elsif value.match(/^-?\d+$/)
+        value = value.to_i
+      else
+        raise(Puppet::ParseError, 'abs(): Requires float or ' +
+          'integer to work with')
+      end
+    end
+
+    # We have numeric value to handle ...
+    result = value.abs
+
+    return result
+  end
+end
+
+# vim: set ts=2 sw=2 et :

+ 33 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/any2array.rb

@@ -0,0 +1,33 @@
+#
+# any2array.rb
+#
+
+module Puppet::Parser::Functions
+  newfunction(:any2array, :type => :rvalue, :doc => <<-EOS
+This converts any object to an array containing that object. Empty argument
+lists are converted to an empty array. Arrays are left untouched. Hashes are
+converted to arrays of alternating keys and values.
+    EOS
+  ) do |arguments|
+
+    if arguments.empty?
+        return []
+    end
+
+    if arguments.length == 1
+        if arguments[0].kind_of?(Array)
+            return arguments[0]
+        elsif arguments[0].kind_of?(Hash)
+            result = []
+            arguments[0].each do |key, value|
+                result << key << value
+            end
+            return result
+        end
+    end
+
+    return arguments
+  end
+end
+
+# vim: set ts=2 sw=2 et :

+ 49 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/bool2num.rb

@@ -0,0 +1,49 @@
+#
+# bool2num.rb
+#
+
+module Puppet::Parser::Functions
+  newfunction(:bool2num, :type => :rvalue, :doc => <<-EOS
+    Converts a boolean to a number. Converts the values:
+      false, f, 0, n, and no to 0
+      true, t, 1, y, and yes to 1
+    Requires a single boolean or string as an input.
+    EOS
+  ) do |arguments|
+
+    raise(Puppet::ParseError, "bool2num(): Wrong number of arguments " +
+      "given (#{arguments.size} for 1)") if arguments.size < 1
+
+    value = arguments[0]
+    klass = value.class
+
+    # We can have either true or false, or string which resembles boolean ...
+    unless [FalseClass, TrueClass, String].include?(klass)
+      raise(Puppet::ParseError, 'bool2num(): Requires either ' +
+        'boolean or string to work with')
+    end
+
+    if value.is_a?(String)
+      # We consider all the yes, no, y, n and so on too ...
+      value = case value
+        #
+        # This is how undef looks like in Puppet ...
+        # We yield 0 (or false if you wish) in this case.
+        #
+        when /^$/, '' then false # Empty string will be false ...
+        when /^(1|t|y|true|yes)$/  then true
+        when /^(0|f|n|false|no)$/  then false
+        when /^(undef|undefined)$/ then false # This is not likely to happen ...
+        else
+          raise(Puppet::ParseError, 'bool2num(): Unknown type of boolean given')
+      end
+    end
+
+    # We have real boolean values as well ...
+    result = value ? 1 : 0
+
+    return result
+  end
+end
+
+# vim: set ts=2 sw=2 et :

+ 34 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/capitalize.rb

@@ -0,0 +1,34 @@
+#
+#  capitalize.rb
+#
+
+module Puppet::Parser::Functions
+  newfunction(:capitalize, :type => :rvalue, :doc => <<-EOS
+    Capitalizes the first letter of a string or array of strings.
+    Requires either a single string or an array as an input.
+    EOS
+  ) do |arguments|
+
+    raise(Puppet::ParseError, "capitalize(): Wrong number of arguments " +
+      "given (#{arguments.size} for 1)") if arguments.size < 1
+
+    value = arguments[0]
+    klass = value.class
+
+    unless [Array, String].include?(klass)
+      raise(Puppet::ParseError, 'capitalize(): Requires either ' +
+        'array or string to work with')
+    end
+
+    if value.is_a?(Array)
+      # Numbers in Puppet are often string-encoded which is troublesome ...
+      result = value.collect { |i| i.is_a?(String) ? i.capitalize : i }
+    else
+      result = value.capitalize
+    end
+
+    return result
+  end
+end
+
+# vim: set ts=2 sw=2 et :

+ 35 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/chomp.rb

@@ -0,0 +1,35 @@
+#
+#  chomp.rb
+#
+
+module Puppet::Parser::Functions
+  newfunction(:chomp, :type => :rvalue, :doc => <<-'EOS'
+    Removes the record separator from the end of a string or an array of
+    strings, for example `hello\n` becomes `hello`.
+    Requires a single string or array as an input.
+    EOS
+  ) do |arguments|
+
+    raise(Puppet::ParseError, "chomp(): Wrong number of arguments " +
+      "given (#{arguments.size} for 1)") if arguments.size < 1
+
+    value = arguments[0]
+    klass = value.class
+
+    unless [Array, String].include?(klass)
+      raise(Puppet::ParseError, 'chomp(): Requires either ' +
+        'array or string to work with')
+    end
+
+    if value.is_a?(Array)
+      # Numbers in Puppet are often string-encoded which is troublesome ...
+      result = value.collect { |i| i.is_a?(String) ? i.chomp : i }
+    else
+      result = value.chomp
+    end
+
+    return result
+  end
+end
+
+# vim: set ts=2 sw=2 et :

+ 37 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/chop.rb

@@ -0,0 +1,37 @@
+#
+#  chop.rb
+#
+
+module Puppet::Parser::Functions
+  newfunction(:chop, :type => :rvalue, :doc => <<-'EOS'
+    Returns a new string with the last character removed. If the string ends
+    with `\r\n`, both characters are removed. Applying chop to an empty
+    string returns an empty string. If you wish to merely remove record
+    separators then you should use the `chomp` function.
+    Requires a string or array of strings as input.
+    EOS
+  ) do |arguments|
+
+    raise(Puppet::ParseError, "chop(): Wrong number of arguments " +
+      "given (#{arguments.size} for 1)") if arguments.size < 1
+
+    value = arguments[0]
+    klass = value.class
+
+    unless [Array, String].include?(klass)
+      raise(Puppet::ParseError, 'chop(): Requires either an ' +
+        'array or string to work with')
+    end
+
+    if value.is_a?(Array)
+      # Numbers in Puppet are often string-encoded which is troublesome ...
+      result = value.collect { |i| i.is_a?(String) ? i.chop : i }
+    else
+      result = value.chop
+    end
+
+    return result
+  end
+end
+
+# vim: set ts=2 sw=2 et :

+ 37 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/concat.rb

@@ -0,0 +1,37 @@
+#
+# concat.rb
+#
+
+module Puppet::Parser::Functions
+  newfunction(:concat, :type => :rvalue, :doc => <<-EOS
+Appends the contents of array 2 onto array 1.
+
+*Example:*
+
+    concat(['1','2','3'],['4','5','6'])
+
+Would result in:
+
+  ['1','2','3','4','5','6']
+    EOS
+  ) do |arguments|
+
+    # Check that 2 arguments have been given ...
+    raise(Puppet::ParseError, "concat(): Wrong number of arguments " +
+      "given (#{arguments.size} for 2)") if arguments.size != 2
+
+    a = arguments[0]
+    b = arguments[1]
+
+    # Check that both args are arrays.
+    unless a.is_a?(Array) and b.is_a?(Array)
+      raise(Puppet::ParseError, 'concat(): Requires array to work with')
+    end
+
+    result = a.concat(b)
+
+    return result
+  end
+end
+
+# vim: set ts=2 sw=2 et :

+ 22 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/count.rb

@@ -0,0 +1,22 @@
+module Puppet::Parser::Functions
+  newfunction(:count, :type => :rvalue, :arity => -2, :doc => <<-EOS
+Takes an array as first argument and an optional second argument.
+Count the number of elements in array that matches second argument.
+If called with only an array it counts the number of elements that are not nil/undef.
+    EOS
+  ) do |args|
+
+    if (args.size > 2) then
+      raise(ArgumentError, "count(): Wrong number of arguments "+
+        "given #{args.size} for 1 or 2.")
+    end
+
+    collection, item = args
+
+    if item then
+      collection.count item
+    else
+      collection.count { |obj| obj != nil && obj != :undef && obj != '' }
+    end
+  end
+end

+ 35 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/defined_with_params.rb

@@ -0,0 +1,35 @@
+# Test whether a given class or definition is defined
+require 'puppet/parser/functions'
+
+Puppet::Parser::Functions.newfunction(:defined_with_params,
+                                      :type => :rvalue,
+                                      :doc => <<-'ENDOFDOC'
+Takes a resource reference and an optional hash of attributes.
+
+Returns true if a resource with the specified attributes has already been added
+to the catalog, and false otherwise.
+
+    user { 'dan':
+      ensure => present,
+    }
+
+    if ! defined_with_params(User[dan], {'ensure' => 'present' }) {
+      user { 'dan': ensure => present, }
+    }
+ENDOFDOC
+) do |vals|
+  reference, params = vals
+  raise(ArgumentError, 'Must specify a reference') unless reference
+  if (! params) || params == ''
+    params = {}
+  end
+  ret = false
+  if resource = findresource(reference.to_s)
+    matches = params.collect do |key, value|
+      resource[key] == value
+    end
+    ret = params.empty? || !matches.include?(false)
+  end
+  Puppet.debug("Resource #{reference} was not determined to be defined")
+  ret
+end

+ 46 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/delete.rb

@@ -0,0 +1,46 @@
+#
+# delete.rb
+#
+
+# TODO(Krzysztof Wilczynski): We need to add support for regular expression ...
+
+module Puppet::Parser::Functions
+  newfunction(:delete, :type => :rvalue, :doc => <<-EOS
+Deletes all instances of a given element from an array, substring from a
+string, or key from a hash.
+
+*Examples:*
+
+    delete(['a','b','c','b'], 'b')
+    Would return: ['a','c']
+
+    delete({'a'=>1,'b'=>2,'c'=>3}, 'b')
+    Would return: {'a'=>1,'c'=>3}
+
+    delete('abracadabra', 'bra')
+    Would return: 'acada'
+    EOS
+  ) do |arguments|
+
+    if (arguments.size != 2) then
+      raise(Puppet::ParseError, "delete(): Wrong number of arguments "+
+        "given #{arguments.size} for 2.")
+    end
+
+    collection = arguments[0]
+    item = arguments[1]
+
+    case collection
+    when Array, Hash
+      collection.delete item
+    when String
+      collection.gsub! item, ''
+    else
+      raise(TypeError, "delete(): First argument must be an Array, " +
+            "String, or Hash. Given an argument of class #{collection.class}.")
+    end
+    collection
+  end
+end
+
+# vim: set ts=2 sw=2 et :

+ 49 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/delete_at.rb

@@ -0,0 +1,49 @@
+#
+# delete_at.rb
+#
+
+module Puppet::Parser::Functions
+  newfunction(:delete_at, :type => :rvalue, :doc => <<-EOS
+Deletes a determined indexed value from an array.
+
+*Examples:*
+
+    delete_at(['a','b','c'], 1)
+
+Would return: ['a','c']
+    EOS
+  ) do |arguments|
+
+    raise(Puppet::ParseError, "delete_at(): Wrong number of arguments " +
+      "given (#{arguments.size} for 2)") if arguments.size < 2
+
+    array = arguments[0]
+
+    unless array.is_a?(Array)
+      raise(Puppet::ParseError, 'delete_at(): Requires array to work with')
+    end
+
+    index = arguments[1]
+
+    if index.is_a?(String) and not index.match(/^\d+$/)
+      raise(Puppet::ParseError, 'delete_at(): You must provide ' +
+        'non-negative numeric index')
+    end
+
+    result = array.clone
+
+    # Numbers in Puppet are often string-encoded which is troublesome ...
+    index = index.to_i
+
+    if index > result.size - 1 # First element is at index 0 is it not?
+      raise(Puppet::ParseError, 'delete_at(): Given index ' +
+        'exceeds size of array given')
+    end
+
+    result.delete_at(index) # We ignore the element that got deleted ...
+
+    return result
+  end
+end
+
+# vim: set ts=2 sw=2 et :

+ 15 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/dirname.rb

@@ -0,0 +1,15 @@
+module Puppet::Parser::Functions
+  newfunction(:dirname, :type => :rvalue, :doc => <<-EOS
+    Returns the dirname of a path.
+    EOS
+  ) do |arguments|
+
+    raise(Puppet::ParseError, "dirname(): Wrong number of arguments " +
+      "given (#{arguments.size} for 1)") if arguments.size < 1
+
+    path = arguments[0]
+    return File.dirname(path)
+  end
+end
+
+# vim: set ts=2 sw=2 et :

+ 33 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/downcase.rb

@@ -0,0 +1,33 @@
+#
+#  downcase.rb
+#
+
+module Puppet::Parser::Functions
+  newfunction(:downcase, :type => :rvalue, :doc => <<-EOS
+Converts the case of a string or all strings in an array to lower case.
+    EOS
+  ) do |arguments|
+
+    raise(Puppet::ParseError, "downcase(): Wrong number of arguments " +
+      "given (#{arguments.size} for 1)") if arguments.size < 1
+
+    value = arguments[0]
+    klass = value.class
+
+    unless [Array, String].include?(klass)
+      raise(Puppet::ParseError, 'downcase(): Requires either ' +
+        'array or string to work with')
+    end
+
+    if value.is_a?(Array)
+      # Numbers in Puppet are often string-encoded which is troublesome ...
+      result = value.collect { |i| i.is_a?(String) ? i.downcase : i }
+    else
+      result = value.downcase
+    end
+
+    return result
+  end
+end
+
+# vim: set ts=2 sw=2 et :

+ 28 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/empty.rb

@@ -0,0 +1,28 @@
+#
+# empty.rb
+#
+
+module Puppet::Parser::Functions
+  newfunction(:empty, :type => :rvalue, :doc => <<-EOS
+Returns true if the variable is empty.
+    EOS
+  ) do |arguments|
+
+    raise(Puppet::ParseError, "empty(): Wrong number of arguments " +
+      "given (#{arguments.size} for 1)") if arguments.size < 1
+
+    value = arguments[0]
+    klass = value.class
+
+    unless [Array, Hash, String].include?(klass)
+      raise(Puppet::ParseError, 'empty(): Requires either ' +
+        'array, hash or string to work with')
+    end
+
+    result = value.empty?
+
+    return result
+  end
+end
+
+# vim: set ts=2 sw=2 et :

+ 24 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/ensure_packages.rb

@@ -0,0 +1,24 @@
+#
+# ensure_packages.rb
+#
+require 'puppet/parser/functions'
+
+module Puppet::Parser::Functions
+  newfunction(:ensure_packages, :type => :statement, :doc => <<-EOS
+Takes a list of packages and only installs them if they don't already exist.
+    EOS
+  ) do |arguments|
+
+    raise(Puppet::ParseError, "ensure_packages(): Wrong number of arguments " +
+      "given (#{arguments.size} for 1)") if arguments.size != 1
+    raise(Puppet::ParseError, "ensure_packages(): Requires array " +
+      "given (#{arguments[0].class})") if !arguments[0].kind_of?(Array)
+
+    Puppet::Parser::Functions.function(:ensure_resource)
+    arguments[0].each { |package_name|
+      function_ensure_resource(['package', package_name, {'ensure' => 'present' } ])
+    }
+  end
+end
+
+# vim: set ts=2 sw=2 et :

+ 45 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/ensure_resource.rb

@@ -0,0 +1,45 @@
+# Test whether a given class or definition is defined
+require 'puppet/parser/functions'
+
+Puppet::Parser::Functions.newfunction(:ensure_resource,
+                                      :type => :statement,
+                                      :doc => <<-'ENDOFDOC'
+Takes a resource type, title, and a list of attributes that describe a
+resource.
+
+    user { 'dan':
+      ensure => present,
+    }
+
+This example only creates the resource if it does not already exist:
+
+    ensure_resource('user, 'dan', {'ensure' => 'present' })
+
+If the resource already exists but does not match the specified parameters,
+this function will attempt to recreate the resource leading to a duplicate
+resource definition error.
+
+An array of resources can also be passed in and each will be created with
+the type and parameters specified if it doesn't already exist.
+
+    ensure_resource('user', ['dan','alex'], {'ensure' => 'present'})
+
+ENDOFDOC
+) do |vals|
+  type, title, params = vals
+  raise(ArgumentError, 'Must specify a type') unless type
+  raise(ArgumentError, 'Must specify a title') unless title
+  params ||= {}
+
+  items = [title].flatten
+
+  items.each do |item|
+    Puppet::Parser::Functions.function(:defined_with_params)
+    if function_defined_with_params(["#{type}[#{item}]", params])
+      Puppet.debug("Resource #{type}[#{item}] not created because it already exists")
+    else
+      Puppet::Parser::Functions.function(:create_resources)
+      function_create_resources([type.capitalize, { item => params }])
+    end
+  end
+end

+ 33 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/flatten.rb

@@ -0,0 +1,33 @@
+#
+# flatten.rb
+#
+
+module Puppet::Parser::Functions
+  newfunction(:flatten, :type => :rvalue, :doc => <<-EOS
+This function flattens any deeply nested arrays and returns a single flat array
+as a result.
+
+*Examples:*
+
+    flatten(['a', ['b', ['c']]])
+
+Would return: ['a','b','c']
+    EOS
+  ) do |arguments|
+
+    raise(Puppet::ParseError, "flatten(): Wrong number of arguments " +
+      "given (#{arguments.size} for 1)") if arguments.size != 1
+
+    array = arguments[0]
+
+    unless array.is_a?(Array)
+      raise(Puppet::ParseError, 'flatten(): Requires array to work with')
+    end
+
+    result = array.flatten
+
+    return result
+  end
+end
+
+# vim: set ts=2 sw=2 et :

+ 20 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/floor.rb

@@ -0,0 +1,20 @@
+module Puppet::Parser::Functions
+  newfunction(:floor, :type => :rvalue, :doc => <<-EOS
+    Returns the largest integer less or equal to the argument.
+    Takes a single numeric value as an argument.
+    EOS
+  ) do |arguments|
+
+    raise(Puppet::ParseError, "floor(): Wrong number of arguments " +
+          "given (#{arguments.size} for 1)") if arguments.size != 1
+
+    arg = arguments[0]
+
+    raise(Puppet::ParseError, "floor(): Wrong argument type " +
+          "given (#{arg.class} for Numeric)") if arg.is_a?(Numeric) == false
+
+    arg.floor
+  end
+end
+
+# vim: set ts=2 sw=2 et :

+ 46 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/fqdn_rotate.rb

@@ -0,0 +1,46 @@
+#
+# fqdn_rotate.rb
+#
+
+module Puppet::Parser::Functions
+  newfunction(:fqdn_rotate, :type => :rvalue, :doc => <<-EOS
+Rotates an array a random number of times based on a nodes fqdn.
+    EOS
+  ) do |arguments|
+
+    raise(Puppet::ParseError, "fqdn_rotate(): Wrong number of arguments " +
+      "given (#{arguments.size} for 1)") if arguments.size < 1
+
+    value = arguments[0]
+    klass = value.class
+    require 'digest/md5'
+
+    unless [Array, String].include?(klass)
+      raise(Puppet::ParseError, 'fqdn_rotate(): Requires either ' +
+        'array or string to work with')
+    end
+
+    result = value.clone
+
+    string = value.is_a?(String) ? true : false
+
+    # Check whether it makes sense to rotate ...
+    return result if result.size <= 1
+
+    # We turn any string value into an array to be able to rotate ...
+    result = string ? result.split('') : result
+
+    elements = result.size
+
+    srand(Digest::MD5.hexdigest([lookupvar('::fqdn'),arguments].join(':')).hex)
+    rand(elements).times {
+       result.push result.shift
+    }
+
+    result = string ? result.join : result
+
+    return result
+  end
+end
+
+# vim: set ts=2 sw=2 et :

+ 17 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/get_module_path.rb

@@ -0,0 +1,17 @@
+module Puppet::Parser::Functions
+  newfunction(:get_module_path, :type =>:rvalue, :doc => <<-EOT
+    Returns the absolute path of the specified module for the current
+    environment.
+
+    Example:
+      $module_path = get_module_path('stdlib')
+  EOT
+  ) do |args|
+    raise(Puppet::ParseError, "get_module_path(): Wrong number of arguments, expects one") unless args.size == 1
+    if module_path = Puppet::Module.find(args[0], compiler.environment.to_s)
+      module_path.path
+    else
+      raise(Puppet::ParseError, "Could not find module #{args[0]} in environment #{compiler.environment}")
+    end
+  end
+end

+ 35 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/getparam.rb

@@ -0,0 +1,35 @@
+# Test whether a given class or definition is defined
+require 'puppet/parser/functions'
+
+Puppet::Parser::Functions.newfunction(:getparam,
+                                      :type => :rvalue,
+                                      :doc => <<-'ENDOFDOC'
+Takes a resource reference and name of the parameter and
+returns value of resource's parameter.
+
+*Examples:*
+
+    define example_resource($param) {
+    }
+
+    example_resource { "example_resource_instance":
+        param => "param_value"
+    }
+
+    getparam(Example_resource["example_resource_instance"], "param")
+
+Would return: param_value
+ENDOFDOC
+) do |vals|
+  reference, param = vals
+  raise(ArgumentError, 'Must specify a reference') unless reference
+  raise(ArgumentError, 'Must specify name of a parameter') unless param and param.instance_of? String
+
+  return '' if param.empty?
+
+  if resource = findresource(reference.to_s)
+    return resource[param] if resource[param]
+  end
+
+  return ''
+end

+ 26 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/getvar.rb

@@ -0,0 +1,26 @@
+module Puppet::Parser::Functions
+
+  newfunction(:getvar, :type => :rvalue, :doc => <<-'ENDHEREDOC') do |args|
+    Lookup a variable in a remote namespace.
+
+    For example:
+
+        $foo = getvar('site::data::foo')
+        # Equivalent to $foo = $site::data::foo
+
+    This is useful if the namespace itself is stored in a string:
+
+        $datalocation = 'site::data'
+        $bar = getvar("${datalocation}::bar")
+        # Equivalent to $bar = $site::data::bar
+    ENDHEREDOC
+
+    unless args.length == 1
+      raise Puppet::ParseError, ("getvar(): wrong number of arguments (#{args.length}; must be 1)")
+    end
+
+    self.lookupvar("#{args[0]}")
+
+  end
+
+end

+ 33 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/grep.rb

@@ -0,0 +1,33 @@
+#
+# grep.rb
+#
+
+module Puppet::Parser::Functions
+  newfunction(:grep, :type => :rvalue, :doc => <<-EOS
+This function searches through an array and returns any elements that match
+the provided regular expression.
+
+*Examples:*
+
+    grep(['aaa','bbb','ccc','aaaddd'], 'aaa')
+
+Would return:
+
+    ['aaa','aaaddd']
+    EOS
+  ) do |arguments|
+
+    if (arguments.size != 2) then
+      raise(Puppet::ParseError, "grep(): Wrong number of arguments "+
+        "given #{arguments.size} for 2")
+    end
+
+    a = arguments[0]
+    pattern = Regexp.new(arguments[1])
+
+    a.grep(pattern)
+
+  end
+end
+
+# vim: set ts=2 sw=2 et :

+ 52 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/has_interface_with.rb

@@ -0,0 +1,52 @@
+#
+# has_interface_with
+#
+
+module Puppet::Parser::Functions
+  newfunction(:has_interface_with, :type => :rvalue, :doc => <<-EOS
+Returns boolean based on kind and value:
+  * macaddress
+  * netmask
+  * ipaddress
+  * network
+
+has_interface_with("macaddress", "x:x:x:x:x:x")
+has_interface_with("ipaddress", "127.0.0.1")    => true
+etc.
+
+If no "kind" is given, then the presence of the interface is checked:
+has_interface_with("lo")                        => true
+    EOS
+  ) do |args|
+
+    raise(Puppet::ParseError, "has_interface_with(): Wrong number of arguments " +
+          "given (#{args.size} for 1 or 2)") if args.size < 1 or args.size > 2
+
+    interfaces = lookupvar('interfaces')
+
+    # If we do not have any interfaces, then there are no requested attributes
+    return false if (interfaces == :undefined)
+
+    interfaces = interfaces.split(',')
+
+    if args.size == 1
+      return interfaces.member?(args[0])
+    end
+
+    kind, value = args
+
+    if lookupvar(kind) == value
+      return true
+    end
+
+    result = false
+    interfaces.each do |iface|
+      if value == lookupvar("#{kind}_#{iface}")
+        result = true
+        break
+      end
+    end
+
+    result
+  end
+end

+ 25 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/has_ip_address.rb

@@ -0,0 +1,25 @@
+#
+# has_ip_address
+#
+
+module Puppet::Parser::Functions
+  newfunction(:has_ip_address, :type => :rvalue, :doc => <<-EOS
+Returns true if the client has the requested IP address on some interface.
+
+This function iterates through the 'interfaces' fact and checks the
+'ipaddress_IFACE' facts, performing a simple string comparison.
+    EOS
+  ) do |args|
+
+    raise(Puppet::ParseError, "has_ip_address(): Wrong number of arguments " +
+          "given (#{args.size} for 1)") if args.size != 1
+
+    Puppet::Parser::Functions.autoloader.load(:has_interface_with) \
+      unless Puppet::Parser::Functions.autoloader.loaded?(:has_interface_with)
+
+    function_has_interface_with(['ipaddress', args[0]])
+
+  end
+end
+
+# vim:sts=2 sw=2

+ 25 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/has_ip_network.rb

@@ -0,0 +1,25 @@
+#
+# has_ip_network
+#
+
+module Puppet::Parser::Functions
+  newfunction(:has_ip_network, :type => :rvalue, :doc => <<-EOS
+Returns true if the client has an IP address within the requested network.
+
+This function iterates through the 'interfaces' fact and checks the
+'network_IFACE' facts, performing a simple string comparision.
+    EOS
+  ) do |args|
+
+    raise(Puppet::ParseError, "has_ip_network(): Wrong number of arguments " +
+          "given (#{args.size} for 1)") if args.size != 1
+
+    Puppet::Parser::Functions.autoloader.load(:has_interface_with) \
+      unless Puppet::Parser::Functions.autoloader.loaded?(:has_interface_with)
+
+    function_has_interface_with(['network', args[0]])
+
+  end
+end
+
+# vim:sts=2 sw=2

+ 28 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/has_key.rb

@@ -0,0 +1,28 @@
+module Puppet::Parser::Functions
+
+  newfunction(:has_key, :type => :rvalue, :doc => <<-'ENDHEREDOC') do |args|
+    Determine if a hash has a certain key value.
+
+    Example:
+
+        $my_hash = {'key_one' => 'value_one'}
+        if has_key($my_hash, 'key_two') {
+          notice('we will not reach here')
+        }
+        if has_key($my_hash, 'key_one') {
+          notice('this will be printed')
+        }
+
+    ENDHEREDOC
+
+    unless args.length == 2
+      raise Puppet::ParseError, ("has_key(): wrong number of arguments (#{args.length}; must be 2)")
+    end
+    unless args[0].is_a?(Hash)
+      raise Puppet::ParseError, "has_key(): expects the first argument to be a hash, got #{args[0].inspect} which is of type #{args[0].class}"
+    end
+    args[0].has_key?(args[1])
+
+  end
+
+end

+ 41 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/hash.rb

@@ -0,0 +1,41 @@
+#
+# hash.rb
+#
+
+module Puppet::Parser::Functions
+  newfunction(:hash, :type => :rvalue, :doc => <<-EOS
+This function converts an array into a hash.
+
+*Examples:*
+
+    hash(['a',1,'b',2,'c',3])
+
+Would return: {'a'=>1,'b'=>2,'c'=>3}
+    EOS
+  ) do |arguments|
+
+    raise(Puppet::ParseError, "hash(): Wrong number of arguments " +
+      "given (#{arguments.size} for 1)") if arguments.size < 1
+
+    array = arguments[0]
+
+    unless array.is_a?(Array)
+      raise(Puppet::ParseError, 'hash(): Requires array to work with')
+    end
+
+    result = {}
+
+    begin
+      # This is to make it compatible with older version of Ruby ...
+      array  = array.flatten
+      result = Hash[*array]
+    rescue Exception
+      raise(Puppet::ParseError, 'hash(): Unable to compute ' +
+        'hash from array given')
+    end
+
+    return result
+  end
+end
+
+# vim: set ts=2 sw=2 et :

+ 22 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/is_array.rb

@@ -0,0 +1,22 @@
+#
+# is_array.rb
+#
+
+module Puppet::Parser::Functions
+  newfunction(:is_array, :type => :rvalue, :doc => <<-EOS
+Returns true if the variable passed to this function is an array.
+    EOS
+  ) do |arguments|
+
+    raise(Puppet::ParseError, "is_array(): Wrong number of arguments " +
+      "given (#{arguments.size} for 1)") if arguments.size < 1
+
+    type = arguments[0]
+
+    result = type.is_a?(Array)
+
+    return result
+  end
+end
+
+# vim: set ts=2 sw=2 et :

+ 47 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/is_domain_name.rb

@@ -0,0 +1,47 @@
+#
+# is_domain_name.rb
+#
+
+module Puppet::Parser::Functions
+  newfunction(:is_domain_name, :type => :rvalue, :doc => <<-EOS
+Returns true if the string passed to this function is a syntactically correct domain name.
+    EOS
+  ) do |arguments|
+
+    if (arguments.size != 1) then
+      raise(Puppet::ParseError, "is_domain_name(): Wrong number of arguments "+
+        "given #{arguments.size} for 1")
+    end
+
+    domain = arguments[0]
+
+    # Limits (rfc1035, 3.1)
+    domain_max_length=255
+    label_min_length=1
+    label_max_length=63
+
+    # Allow ".", it is the top level domain
+    return true if domain == '.'
+
+    # Remove the final dot, if present.
+    domain.chomp!('.')
+
+    # Check the whole domain
+    return false if domain.empty?
+    return false if domain.length > domain_max_length
+
+    # Check each label in the domain
+    labels = domain.split('.')
+    vlabels = labels.each do |label|
+      break if label.length < label_min_length
+      break if label.length > label_max_length
+      break if label[-1..-1] == '-'
+      break if label[0..0] == '-'
+      break unless /^[a-z\d-]+$/i.match(label)
+    end
+    return vlabels == labels
+
+  end
+end
+
+# vim: set ts=2 sw=2 et :

+ 27 - 0
puppet4ccb/biemond-wls-vagrant-10.3.6/puppet/modules/stdlib/lib/puppet/parser/functions/is_float.rb

@@ -0,0 +1,27 @@
+#
+# is_float.rb
+#
+
+module Puppet::Parser::Functions
+  newfunction(:is_float, :type => :rvalue, :doc => <<-EOS
+Returns true if the variable passed to this function is a float.
+    EOS
+  ) do |arguments|
+
+    if (arguments.size != 1) then
+      raise(Puppet::ParseError, "is_float(): Wrong number of arguments "+
+        "given #{arguments.size} for 1")
+    end
+
+    value = arguments[0]
+
+    if value != value.to_f.to_s and !value.is_a? Float then
+      return false
+    else
+      return true
+    end
+
+  end
+end
+
+# vim: set ts=2 sw=2 et :

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio