Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
# lesson12
# lesson12

SHOW DATABASES;
+--------------------+
| Database |
+--------------------+
| information_schema |
| test_mdb |
+--------------------+
24 changes: 24 additions & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :

$vm1_ip="192.168.56.107"
#$cookbook_dir="~/chef/task7/cookbooks"
Vagrant.configure(2) do |config|

config.vm.define "vm7" do |vm7_config|
vm7_config.vm.box = "sbeliakou/centos-6.8-x86_64"
vm7_config.vm.network "private_network", ip: $vm1_ip
vm7_config.vm.hostname = "vm7.mnt.com"
vm7_config.vm.provider "virtualbox" do |v|
v.name = "vm7"
v.customize ["modifyvm", :id, "--memory", 2048]
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
end
# config.vm.provision "chef_solo" do |chef|
# chef.cookbooks_path = $cookbook_dir
# chef.add_recipe "java::default"
# chef.add_recipe "jboss::default"
# end
#vm7_config.vm.synced_folder "~/chef", "/var/chef" #, type: "nfs"
end
end
20 changes: 20 additions & 0 deletions site.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
node vm7.mnt.com {
class {'::mysql::server':
root_password => 'rootroot',
}
mysql_database {'test_mdb':
ensure => present,
charset => 'utf8',
}
mysql_user { 'test_user@localhost':
ensure => present,
password_hash => mysql_password('testtest'),
}
mysql_grant {'test_user@localhost/test_mdb.*':
ensure => present,
options => ['GRANT'],
privileges => ['ALL'],
table => 'test_mdb.*',
user => 'test_user@localhost',
}
}