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

@@ -3,9 +3,11 @@
# Provider:: Ark
#
# Author:: Bryan W. Berry <bryan.berry@gmail.com>
# Author:: Sean OMeara <someara@opscode.com
# Author:: Sean OMeara <someara@chef.io
# Author:: John Bellone <jbellone@bloomberg.net>
# Copyright 2012, Bryan W. Berry
# Copyright 2013, Opscode, Inc.
# Copyright 2013, Chef Software, Inc.
# Copyright 2014, Bloomberg L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -20,14 +22,8 @@
# limitations under the License.
#
use_inline_resources if defined?(use_inline_resources)
include ::Opscode::Ark::ProviderHelpers
# From resources/default.rb
# :install, :put, :dump, :cherry_pick, :install_with_make, :configure, :setup_py_build, :setup_py_install, :setup_py
#
# Used in test.rb
# :install, :put, :dump, :cherry_pick, :install_with_make, :configure
use_inline_resources
include ::Ark::ProviderHelpers
#################
# action :install
@@ -51,9 +47,8 @@ action :install do
end
# unpack based on file extension
_unpack_command = unpack_command
execute "unpack #{new_resource.release_file}" do
command _unpack_command
command unpack_command
cwd new_resource.path
environment new_resource.environment
notifies :run, "execute[set owner on #{new_resource.path}]"
@@ -61,14 +56,13 @@ action :install do
end
# set_owner
_owner_command = owner_command
execute "set owner on #{new_resource.path}" do
command _owner_command
command owner_command
action :nothing
end
# usually on windows there is no central directory with executables where the applciations are linked
if not node['platform_family'] === 'windows'
unless node['platform_family'] == 'windows'
# symlink binaries
new_resource.has_binaries.each do |bin|
link ::File.join(new_resource.prefix_bin, ::File.basename(bin)) do
@@ -89,7 +83,7 @@ action :install do
group 'root'
mode '0755'
cookbook 'ark'
variables(:directory => "#{new_resource.path}/bin")
variables(directory: "#{new_resource.path}/bin")
only_if { new_resource.append_env_path }
end
end
@@ -100,7 +94,9 @@ action :install do
block do
ENV['PATH'] = bin_path + ':' + ENV['PATH']
end
only_if { new_resource.append_env_path && ENV['PATH'].scan(bin_path).empty? }
only_if do
new_resource.append_env_path && ENV['PATH'].scan(bin_path).empty?
end
end
end
@@ -126,9 +122,8 @@ action :put do
end
# unpack based on file extension
_unpack_command = unpack_command
execute "unpack #{new_resource.release_file}" do
command _unpack_command
command unpack_command
cwd new_resource.path
environment new_resource.environment
notifies :run, "execute[set owner on #{new_resource.path}]"
@@ -136,9 +131,8 @@ action :put do
end
# set_owner
_owner_command = owner_command
execute "set owner on #{new_resource.path}" do
command _owner_command
command owner_command
action :nothing
end
end
@@ -166,9 +160,8 @@ action :dump do
end
# unpack based on file extension
_dump_command = dump_command
execute "unpack #{new_resource.release_file}" do
command _dump_command
command dump_command
cwd new_resource.path
environment new_resource.environment
notifies :run, "execute[set owner on #{new_resource.path}]"
@@ -176,9 +169,8 @@ action :dump do
end
# set_owner
_owner_command = owner_command
execute "set owner on #{new_resource.path}" do
command _owner_command
command owner_command
action :nothing
end
end
@@ -206,9 +198,8 @@ action :unzip do
end
# unpack based on file extension
_unzip_command = unzip_command
execute "unpack #{new_resource.release_file}" do
command _unzip_command
command unzip_command
cwd new_resource.path
environment new_resource.environment
notifies :run, "execute[set owner on #{new_resource.path}]"
@@ -216,9 +207,8 @@ action :unzip do
end
# set_owner
_owner_command = owner_command
execute "set owner on #{new_resource.path}" do
command _owner_command
command owner_command
action :nothing
end
end
@@ -245,20 +235,16 @@ action :cherry_pick do
notifies :run, "execute[cherry_pick #{new_resource.creates} from #{new_resource.release_file}]"
end
_unpack_type = unpack_type
_cherry_pick_command = cherry_pick_command
execute "cherry_pick #{new_resource.creates} from #{new_resource.release_file}" do
Chef::Log.debug("DEBUG: unpack_type: #{_unpack_type}")
command _cherry_pick_command
command cherry_pick_command
creates "#{new_resource.path}/#{new_resource.creates}"
notifies :run, "execute[set owner on #{new_resource.path}]"
action :nothing
end
# set_owner
_owner_command = owner_command
execute "set owner on #{new_resource.path}" do
command _owner_command
command owner_command
action :nothing
end
end
@@ -285,9 +271,8 @@ action :install_with_make do
end
# unpack based on file extension
_unpack_command = unpack_command
execute "unpack #{new_resource.release_file}" do
command _unpack_command
command unpack_command
cwd new_resource.path
environment new_resource.environment
notifies :run, "execute[set owner on #{new_resource.path}]"
@@ -299,9 +284,8 @@ action :install_with_make do
end
# set_owner
_owner_command = owner_command
execute "set owner on #{new_resource.path}" do
command _owner_command
command owner_command
action :nothing
end
@@ -335,9 +319,132 @@ action :install_with_make do
environment new_resource.environment
action :nothing
end
end
# unless new_resource.creates and ::File.exists? new_resource.creates
# end
action :setup_py_build do
show_deprecations
set_paths
directory new_resource.path do
recursive true
action :create
notifies :run, "execute[unpack #{new_resource.release_file}]"
end
remote_file new_resource.release_file do
Chef::Log.debug('DEBUG: new_resource.release_file')
source new_resource.url
checksum new_resource.checksum if new_resource.checksum
action :create
notifies :run, "execute[unpack #{new_resource.release_file}]"
end
# unpack based on file extension
execute "unpack #{new_resource.release_file}" do
command unpack_command
cwd new_resource.path
environment new_resource.environment
notifies :run, "execute[set owner on #{new_resource.path}]"
notifies :run, "execute[python setup.py build #{new_resource.path}]"
action :nothing
end
# set_owner
execute "set owner on #{new_resource.path}" do
command owner_command
action :nothing
end
execute "python setup.py build #{new_resource.path}" do
command "python setup.py build #{new_resource.make_opts.join(' ')}"
cwd new_resource.path
environment new_resource.environment
action :nothing
end
end
action :setup_py_install do
show_deprecations
set_paths
directory new_resource.path do
recursive true
action :create
notifies :run, "execute[unpack #{new_resource.release_file}]"
end
remote_file new_resource.release_file do
Chef::Log.debug('DEBUG: new_resource.release_file')
source new_resource.url
checksum new_resource.checksum if new_resource.checksum
action :create
notifies :run, "execute[unpack #{new_resource.release_file}]"
end
# unpack based on file extension
execute "unpack #{new_resource.release_file}" do
command unpack_command
cwd new_resource.path
environment new_resource.environment
notifies :run, "execute[set owner on #{new_resource.path}]"
notifies :run, "execute[python setup.py install #{new_resource.path}]"
action :nothing
end
# set_owner
execute "set owner on #{new_resource.path}" do
command owner_command
action :nothing
end
execute "python setup.py install #{new_resource.path}" do
command "python setup.py install #{new_resource.make_opts.join(' ')}"
cwd new_resource.path
environment new_resource.environment
action :nothing
end
end
action :setup_py do
show_deprecations
set_paths
directory new_resource.path do
recursive true
action :create
notifies :run, "execute[unpack #{new_resource.release_file}]"
end
remote_file new_resource.release_file do
Chef::Log.debug('DEBUG: new_resource.release_file')
source new_resource.url
checksum new_resource.checksum if new_resource.checksum
action :create
notifies :run, "execute[unpack #{new_resource.release_file}]"
end
# unpack based on file extension
execute "unpack #{new_resource.release_file}" do
command unpack_command
cwd new_resource.path
environment new_resource.environment
notifies :run, "execute[set owner on #{new_resource.path}]"
notifies :run, "execute[python setup.py #{new_resource.path}]"
action :nothing
end
# set_owner
execute "set owner on #{new_resource.path}" do
command owner_command
action :nothing
end
execute "python setup.py #{new_resource.path}" do
command "python setup.py #{new_resource.make_opts.join(' ')}"
cwd new_resource.path
environment new_resource.environment
action :nothing
end
end
action :configure do
@@ -359,9 +466,8 @@ action :configure do
end
# unpack based on file extension
_unpack_command = unpack_command
execute "unpack #{new_resource.release_file}" do
command _unpack_command
command unpack_command
cwd new_resource.path
environment new_resource.environment
notifies :run, "execute[set owner on #{new_resource.path}]"
@@ -371,9 +477,8 @@ action :configure do
end
# set_owner
_owner_command = owner_command
execute "set owner on #{new_resource.path}" do
command _owner_command
command owner_command
action :nothing
end