diff options
Diffstat (limited to 'manifests/admin_user.pp')
-rw-r--r-- | manifests/admin_user.pp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/manifests/admin_user.pp b/manifests/admin_user.pp new file mode 100644 index 0000000..52d01fc --- /dev/null +++ b/manifests/admin_user.pp @@ -0,0 +1,17 @@ +define mysql::admin_user( + $ensure = present, + $host = '127.0.0.1', + $password +){ + mysql_user{"${name}@${host}": + ensure => $ensure, + password_hash => $password ? { + 'trocla' => trocla("mysql_admin-user_${name}",'mysql'), + default => $password, + }, + } + mysql_grant{"${name}@${host}": + privileges => 'all', + require => Mysql_user["${name}@${host}"], + } +} |