Update cookbooks and add wordpress cookbook

This commit is contained in:
Greg Karékinian
2016-02-19 18:09:49 +01:00
parent 9ba973e3ac
commit 820b0ab3f8
606 changed files with 22421 additions and 14084 deletions

View File

@@ -17,13 +17,21 @@
# limitations under the License.
#
require "chef/rest"
require "chef/mash"
require "net/http"
unless(Chef.constants.include?(:Mash))
Chef::Mash = Mash
end
module OmnibusTrucker
class << self
URL_MAP = {
:p => :platform, :pv => :platform_version, :m => :machine,
:v => :version, :prerelease => :prerelease,
:nightlies => :nightlies
}
} unless defined?(URL_MAP)
def build_url(*opts)
args = node = nil
@@ -40,7 +48,7 @@ module OmnibusTrucker
if(node)
args = collect_attributes(node).merge(args)
end
url = args[:url] || "http://www.opscode.com/chef/download#{'-server' if args[:server]}"
url = args[:url] || "http://www.chef.io/chef/download#{'-server' if args[:server]}"
u_args = URL_MAP.map do |u_k, a_k|
"#{u_k}=#{args[a_k]}" unless args[a_k].nil?
end.compact
@@ -48,7 +56,7 @@ module OmnibusTrucker
end
def collect_attributes(node, args={})
set = Mash[
set = Chef::Mash[
[:platform_family, :platform, :platform_version].map do |k|
[k, args[k] || node[k]]
end