From: David Schmitt Date: Sat, 6 Oct 2007 08:11:47 +0000 (+0200) Subject: common: remove hand made plugins install defines and use matt's plugins patch X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=d9a3c7617a402a19f7114d9b262d62b3a7b7b24c;p=puppet-common.git common: remove hand made plugins install defines and use matt's plugins patch This moves all facts and puppet plugins to the plugins/ directory of modules to get the benefits of Matt's plugins patch, that distributes these files before the configuration is requested. This reduces the number of configuration runs to convergence by one. --- diff --git a/manifests/defines/puppet_install.pp b/manifests/defines/puppet_install.pp deleted file mode 100644 index dbc9848..0000000 --- a/manifests/defines/puppet_install.pp +++ /dev/null @@ -1,41 +0,0 @@ -# puppet_install.pp -- install puppet functions and facter facts -# Copyright (C) 2007 David Schmitt -# See LICENSE for the full license granted to you. - -# prepare directories to drop various puppet enhancements -file { - [ - "${rubysitedir}", - "${rubysitedir}/facter", - "${rubysitedir}/puppet", - "${rubysitedir}/puppet/provider", - "${rubysitedir}/puppet/provider/user", - "${rubysitedir}/puppet/provider/group" - ]: - ensure => directory, - mode => 0755, owner => root, group => root, -} - -define puppet::function($source) { - file { - "${rubysitedir}/puppet/parser/functions/${name}.rb": - source => $source, - mode => 755, owner => root, group => root, - } -} - -define puppet::fact($source) { - file { - "${rubysitedir}/facter/${name}.rb": - source => $source, - mode => 755, owner => root, group => root, - } -} - -define puppet::provider($source) { - file { - "${rubysitedir}/puppet/provider/${name}.rb": - source => $source, - mode => 755, owner => root, group => root, - } -} diff --git a/manifests/init.pp b/manifests/init.pp index bdaaee2..577b0c6 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -12,17 +12,5 @@ file { mode => 0755, owner => root, group => root; } -class common::puppetmaster { - file { - "${rubysitedir}/puppet/parser": - ensure => directory, - mode => 0755, owner => root, group => root; - "$rubysitedir/puppet/parser/functions": - source => "puppet://$servername/common/functions/", - recurse => true, purge => true, - mode => 0755, owner => root, group => root; - } -} - import "defines/*.pp" import "classes/*.pp" diff --git a/files/functions/basename.rb b/plugins/puppet/parser/functions/basename.rb old mode 100755 new mode 100644 similarity index 100% rename from files/functions/basename.rb rename to plugins/puppet/parser/functions/basename.rb diff --git a/files/functions/dirname.rb b/plugins/puppet/parser/functions/dirname.rb old mode 100755 new mode 100644 similarity index 100% rename from files/functions/dirname.rb rename to plugins/puppet/parser/functions/dirname.rb diff --git a/files/functions/gsub.rb b/plugins/puppet/parser/functions/gsub.rb similarity index 100% rename from files/functions/gsub.rb rename to plugins/puppet/parser/functions/gsub.rb diff --git a/files/functions/re_escape.rb b/plugins/puppet/parser/functions/re_escape.rb similarity index 100% rename from files/functions/re_escape.rb rename to plugins/puppet/parser/functions/re_escape.rb diff --git a/files/functions/sha1.rb b/plugins/puppet/parser/functions/sha1.rb similarity index 100% rename from files/functions/sha1.rb rename to plugins/puppet/parser/functions/sha1.rb diff --git a/files/functions/slash_escape.rb b/plugins/puppet/parser/functions/slash_escape.rb similarity index 100% rename from files/functions/slash_escape.rb rename to plugins/puppet/parser/functions/slash_escape.rb diff --git a/files/functions/split.rb b/plugins/puppet/parser/functions/split.rb old mode 100755 new mode 100644 similarity index 100% rename from files/functions/split.rb rename to plugins/puppet/parser/functions/split.rb