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 Sep 20, 2024
1 parent 61f27ec commit 455e261
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 455e261

Please sign in to comment.