Skip to content
Snippets Groups Projects
Commit a09affcc authored by Andreas Alvarsson's avatar Andreas Alvarsson
Browse files

Merge branch 'mysql' into 'production'

MySQL password from hiera

See merge request !3
parents 5a447404 3c30babe
No related branches found
No related tags found
No related merge requests found
...@@ -44,7 +44,9 @@ ...@@ -44,7 +44,9 @@
# #
class skadereg { class skadereg(
$mysql_password
){
::users::liu_user { 'andal699': ::users::liu_user { 'andal699':
commonname => 'Andreas Alvarsson', commonname => 'Andreas Alvarsson',
shell => '/bin/bash', shell => '/bin/bash',
...@@ -60,10 +62,15 @@ class skadereg { ...@@ -60,10 +62,15 @@ class skadereg {
} }
include ::apache::mod::rewrite include ::apache::mod::rewrite
package { 'php55-php-pdo': package {
ensure => installed; 'php55-php-pdo':
'php55-php-mbstring': ensure => installed; ensure => installed;
'php55-php-common': ensure => installed; 'php55-php-mbstring':
ensure => installed;
'php55-php-mysqlnd':
ensure => installed;
'php55-php-common':
ensure => installed;
} }
file { '/etc/httpd/modules/libphp5.so': file { '/etc/httpd/modules/libphp5.so':
...@@ -106,19 +113,19 @@ class skadereg { ...@@ -106,19 +113,19 @@ class skadereg {
} }
file { '/var/www/skadereg/': file { '/var/www/skadereg/':
ensure => directory, ensure => directory,
owner => 'andal699', owner => 'andal699',
group => 'apache', group => 'apache',
mode => '0770', mode => '0770',
recurse => true recurse => true
}-> }->
vcsrepo { '/var/www/skadereg': vcsrepo { '/var/www/skadereg':
ensure => latest, ensure => latest,
before => File['/var/www/skadereg/public'], before => File['/var/www/skadereg/public'],
provider => git, provider => git,
source => 'ssh://git@gitlab.it.liu.se:29418/andal699/laravel.git', source => 'ssh://git@gitlab.it.liu.se:29418/andal699/laravel.git',
user => 'andal699' user => 'andal699'
}-> }->
file { '/var/www/skadereg/.env': file { '/var/www/skadereg/.env':
...@@ -130,13 +137,22 @@ class skadereg { ...@@ -130,13 +137,22 @@ class skadereg {
} }
class { '::mysql::server': class { '::mysql::server':
root_password => 'ControlAvHandboll', root_password => $mysql_password,
databases => { databases => {
'homestead' => { 'homestead' => {
ensure => present, ensure => present,
charset => 'utf8', charset => 'utf8',
} }
}, },
grants => {
'root' => {
ensure => present,
options => ['GRANT'],
privileges => ['SELECT', 'INSERT', 'UPDATE', 'DELETE'],
table => '*.*',
user => "'root'@'%'",
}
},
override_options => { override_options => {
mysqld => { mysqld => {
'bind-address' => '0.0.0.0', 'bind-address' => '0.0.0.0',
...@@ -144,4 +160,4 @@ class skadereg { ...@@ -144,4 +160,4 @@ class skadereg {
} }
} }
} }
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment