Advertisement
Guest User

Untitled

a guest
Dec 12th, 2016
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.36 KB | None | 0 0
  1. class hg_playground::makowals::brains::db {
  2.  
  3. class { '::mysql::client':
  4. package_name => 'mariadb',
  5. }
  6.  
  7. $override_options = {
  8. 'mysqld' => {
  9. 'log-bin' => '',
  10. 'server-id' => $mysql_server_id,
  11. }
  12. }
  13. class { '::mysql::server':
  14. package_name => 'mariadb-server',
  15. root_password => 'TESTOWY',
  16. remove_default_accounts => true,
  17. override_options => $override_options,
  18. }
  19.  
  20. mysql_user { 'slave_user@localhost':
  21. ensure => 'present',
  22. password_hash => mysql_password('master_replication'),
  23. }
  24.  
  25. mysql_grant { 'slave_user@localhost/*.*':
  26. ensure => 'present',
  27. options => ['GRANT'],
  28. privileges => ['REPLICATION SLAVE'],
  29. table => '*.*',
  30. user => 'slave_user@localhost',
  31. }
  32.  
  33. mysql_database { 'somedb':
  34. ensure => 'present',
  35. }
  36. }
  37.  
  38. notice /Stage[main]/Mysql::Server::Install/Package[mysql-server]/ensure created
  39. notice /Stage[main]/Mysql::Server::Config/File[mysql-config-file]/content content changed '{md5}54dc3e561e817f9c0a376a58383eb013' to '{md5}ff09a4033f718f08f69da17f0aa86652'
  40. notice /Stage[main]/Mysql::Server::Service/Service[mysqld]/ensure ensure changed 'stopped' to 'running'
  41. notice /Stage[main]/Mysql::Server::Root_password/File[/root/.my.cnf]/ensure defined content as '{md5}042e1a46bc15a260a349dbbe1bac8e71'
  42.  
  43. class hg_playground::makowals::brains::db {
  44. class { '::mysql::client':
  45. package_name => 'mariadb',
  46. }
  47.  
  48. $override_options = {
  49. 'mysqld' => {
  50. 'log-bin' => '',
  51. 'server-id' => $mysql_server_id,
  52. }
  53. }
  54. class { '::mysql::server':
  55. package_name => 'mariadb-server',
  56. root_password => 'TESTOWY',
  57. remove_default_accounts => true,
  58. override_options => $override_options,
  59. }
  60.  
  61. mysql_user { 'slave_user@localhost':
  62. ensure => 'present',
  63. password_hash => mysql_password('master_replication'),
  64. }
  65.  
  66. mysql_grant { 'slave_user@localhost/*.*':
  67. ensure => 'present',
  68. options => ['GRANT'],
  69. privileges => ['REPLICATION SLAVE'],
  70. table => '*.*',
  71. user => 'slave_user@localhost',
  72. }
  73.  
  74. mysql_database { 'somedb':
  75. ensure => 'present',
  76. require => Class['mysql::server']
  77. }
  78. }
  79.  
  80. => default: Notice: Compiled catalog for centos7.example.com in environment testing in 2.97 seconds
  81. ==> default: Notice: /Stage[main]/Mysql::Client::Install/Package[mysql_client]/ensure: created
  82. ==> default: Notice: /Stage[main]/Mysql::Server::Install/Package[mysql-server]/ensure: created
  83. ==> default: Notice: /Stage[main]/Mysql::Server::Config/File[mysql-config-file]/content: content changed '{md5}54dc3e561e817f9c0a376a58383eb013' to '{md5}40a2060d1d62cb5c3f33e5e74be19889'
  84. ==> default: Notice: /Stage[main]/Mysql::Server::Installdb/Exec[mysql_install_db]/returns: executed successfully
  85. ==> default: Notice: /Stage[main]/Mysql::Server::Service/Service[mysqld]/ensure: ensure changed 'stopped' to 'running'
  86. ==> default: Notice: /Stage[main]/Mysql::Server::Root_password/Mysql_user[root@localhost]/password_hash: defined 'password_hash' as '*416F1598B4E5F9CD0DBFC2E35867FA1F96EBF4F5'
  87. ==> default: Notice: /Stage[main]/Mysql::Server::Root_password/File[/root/.my.cnf]/ensure: defined content as '{md5}cd27be3d51dcd48e92de9df7e894accb'
  88. ==> default: Notice: /Stage[main]/Mysql::Server::Account_security/Mysql_user[root@127.0.0.1]/ensure: removed
  89. ==> default: Notice: /Stage[main]/Mysql::Server::Account_security/Mysql_user[root@::1]/ensure: removed
  90. ==> default: Notice: /Stage[main]/Mysql::Server::Account_security/Mysql_user[@localhost]/ensure: removed
  91. ==> default: Notice: /Stage[main]/Mysql::Server::Account_security/Mysql_user[root@centos7.example.com]/ensure: removed
  92. ==> default: Notice: /Stage[main]/Mysql::Server::Account_security/Mysql_user[@centos7.example.com]/ensure: removed
  93. ==> default: Notice: /Stage[main]/Mysql::Server::Account_security/Mysql_database[test]/ensure: removed
  94. ==> default: Notice: /Stage[main]/Hg_playground::Makowals::Brains::Db/Mysql_user[slave_user@localhost]/ensure: created
  95. ==> default: Notice: /Stage[main]/Hg_playground::Makowals::Brains::Db/Mysql_grant[slave_user@localhost/*.*]/privileges: privileges changed ['USAGE'] to 'REPLICATION SLAVE'
  96. ==> default: Notice: /Stage[main]/Hg_playground::Makowals::Brains::Db/Mysql_grant[slave_user@localhost/*.*]/options: defined 'options' as 'GRANT'
  97. ==> default: Notice: /Stage[main]/Hg_playground::Makowals::Brains::Db/Mysql_database[somedb]/ensure: created
  98.  
  99. class{ 'mysql::server':
  100. package_name => "mariadb-server-${mariadb_version}",
  101. ...
  102. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement