From 00d3aa1f4f835a78e14827d5ac1ae9e94bc3f924 Mon Sep 17 00:00:00 2001 From: Nick Walker Date: Thu, 25 Feb 2016 15:23:12 -0800 Subject: Move profile::git_webhook into seperate module pe_code_manager_webhook Prior to this commit the functionality to setup the either code manager or zack/r10k was tightly coupled to this control-repo. In an effort to make that functionality useful to more people we're splitting it into a dedicated module. After this commit, the pe_code_manager_webhook module will contain all logic around setting up the webhook while this control-repo will still gloss over the details needed to get everything in PE setup correctly to use that module. This commit removes the files associated with the profile including some custom functions that were only there to make it work. This commit removes the all_in_one_pe_2015_2 role as it was exactly the same as the all_in_one_pe role. This commit modifies all_in_one_pe to use the pe_code_manager_webhook module instead of the profile. --- .../lib/puppet/parser/functions/no_fail_file.rb | 36 ---------------------- 1 file changed, 36 deletions(-) delete mode 100644 site/no_fail_file/lib/puppet/parser/functions/no_fail_file.rb (limited to 'site/no_fail_file') diff --git a/site/no_fail_file/lib/puppet/parser/functions/no_fail_file.rb b/site/no_fail_file/lib/puppet/parser/functions/no_fail_file.rb deleted file mode 100644 index 3819ebf..0000000 --- a/site/no_fail_file/lib/puppet/parser/functions/no_fail_file.rb +++ /dev/null @@ -1,36 +0,0 @@ -require 'puppet/file_system' - -Puppet::Parser::Functions::newfunction( - :no_fail_file, :arity => -2, :type => :rvalue, - :doc => "Loads a file from a module and returns its contents as a string. - - This is a replacement to the file function that returns nothing - if the file specified cannot be found instead of erroring out. - - The argument to this function should be a `/` - reference, which will load `` from a module's `files` - directory. (For example, the reference `mysql/mysqltuner.pl` will load the - file `/mysql/files/mysqltuner.pl`.) - - This function can also accept: - - * An absolute path, which can load a file from anywhere on disk. - * Multiple arguments, which will return the contents of the **first** file - found, skipping any files that don't exist. - " -) do |vals| - path = nil - vals.each do |file| - found = Puppet::Parser::Files.find_file(file, compiler.environment) - if found && Puppet::FileSystem.exist?(found) - path = found - break - end - end - - if path - Puppet::FileSystem.read_preserve_line_endings(path) - else - nil - end -end -- cgit v1.2.3