Vendor the external cookbooks

Knife-Zero doesn't include Berkshelf support, so vendoring everything in
the repo is convenient again
This commit is contained in:
Greg Karékinian
2019-10-13 19:17:42 +02:00
parent f4bfe31ac1
commit a32f34b408
1245 changed files with 100630 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
::Chef::Recipe.send(:include, Opscode::OpenSSL::Password)
package('libmysqlclient-dev') { action :nothing }.run_action(:install)
build_essential 'mediawiki' do
compile_time true
end
node.normal['mediawiki']['db']['pass'] = secure_password
node.save unless Chef::Config[:solo]
db = node["mediawiki"]["db"]
package %w(mysql-client mysql-server)
service 'mysql' do
action [:enable, :start]
end
# Create database
execute "create #{db["name"]} db" do
command "mysql -e \"CREATE DATABASE IF NOT EXISTS #{db["name"]};\""
user "root"
end
# Create user
execute "create #{db["user"]} user" do
command "mysql -e \"CREATE USER IF NOT EXISTS '#{db["user"]}'@'localhost' IDENTIFIED BY '#{db["pass"]}'; GRANT ALL PRIVILEGES ON #{db["name"]}.* to '#{db["user"]}'@'localhost'; FLUSH PRIVILEGES;\""
sensitive true
user "root"
end