Update cookbooks and add wordpress cookbook
This commit is contained in:
@@ -15,31 +15,22 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
#######
|
||||
# Load the pgdgrepo_rpm_info method from libraries/default.rb
|
||||
::Chef::Recipe.send(:include, Opscode::PostgresqlHelpers)
|
||||
|
||||
######################################
|
||||
# Install the "PostgreSQL RPM Building Project - Yum Repository" through
|
||||
# the repo_rpm_url determined with pgdgrepo_rpm_info method from
|
||||
# libraries/default.rb. The /etc/yum.repos.d/pgdg-*.repo
|
||||
# will provide postgresql9X packages, but you may need to exclude
|
||||
# postgresql packages from the repository of the distro in order to use
|
||||
# PGDG repository properly. Conflicts will arise if postgresql9X does
|
||||
# appear in your distro's repo and you want a more recent patch level.
|
||||
# Install the "PostgreSQL RPM Building Project - Yum Repository"
|
||||
|
||||
repo_rpm_url, repo_rpm_filename, repo_rpm_package = pgdgrepo_rpm_info
|
||||
rpm_platform = node['platform']
|
||||
rpm_platform_version = node['platform_version'].to_f.to_i.to_s
|
||||
arch = node['kernel']['machine']
|
||||
|
||||
# Download the PGDG repository RPM as a local file
|
||||
remote_file "#{Chef::Config[:file_cache_path]}/#{repo_rpm_filename}" do
|
||||
source repo_rpm_url
|
||||
remote_file "#{Chef::Config[:file_cache_path]}/#{node[:postgresql][:pgdg][:repo_rpm_url][node[:postgresql][:version]][rpm_platform][rpm_platform_version][arch][:package]}" do
|
||||
source "#{node[:postgresql][:pgdg][:repo_rpm_url][node[:postgresql][:version]][rpm_platform][rpm_platform_version][arch][:url]}#{node[:postgresql][:pgdg][:repo_rpm_url][node[:postgresql][:version]][rpm_platform][rpm_platform_version][arch][:package]}"
|
||||
mode "0644"
|
||||
end
|
||||
|
||||
# Install the PGDG repository RPM from the local file
|
||||
# E.g., /etc/yum.repos.d/pgdg-91-centos.repo
|
||||
package repo_rpm_package do
|
||||
package "#{node[:postgresql][:pgdg][:repo_rpm_url][node[:postgresql][:version]][rpm_platform][rpm_platform_version][arch][:package]}" do
|
||||
provider Chef::Provider::Package::Rpm
|
||||
source "#{Chef::Config[:file_cache_path]}/#{repo_rpm_filename}"
|
||||
source "#{Chef::Config[:file_cache_path]}/#{node[:postgresql][:pgdg][:repo_rpm_url][node[:postgresql][:version]][rpm_platform][rpm_platform_version][arch][:package]}"
|
||||
action :install
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user