Skip to content

Commit

Permalink
specify user for fulcrum mysql dbs
Browse files Browse the repository at this point in the history
  • Loading branch information
antmoth committed Oct 2, 2024
1 parent c61f327 commit fca2da7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions manifests/profile/fulcrum/mysql.pp
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,13 @@
require => Service["mysqld"],
}

$dbs = [['fedora', $fedora_password], ['fulcrum', $fulcrum_password],
['checkpoint', $fulcrum_password], ['shibd', $shibd_password]]
$dbs = [['fedora', 'fedora', $fedora_password], ['fulcrum', 'fulcrum', $fulcrum_password],
['checkpoint', 'fulcrum', $fulcrum_password], ['shibd', 'shibd', $shibd_password]]

$dbs.each |$db| {
$name = $db[0]
$password = $db[1]
$user = $db[1]
$password = $db[2]
exec { "create-${name}-db":
unless => "/usr/bin/mysql -u${name} -p${password} ${name}",
command => "/usr/bin/mysql -uroot -p${root_password} -e \"create database ${name}; grant all on ${name}.* to ${name}@localhost identified by '${password}';\"",
Expand Down

0 comments on commit fca2da7

Please sign in to comment.