diff options
author | Nicolas Lécureuil <neoclust@mageia.org> | 2017-04-15 22:23:26 +0200 |
---|---|---|
committer | Nicolas Lécureuil <neoclust@mageia.org> | 2017-04-15 22:23:26 +0200 |
commit | 6861829345e113eb3cc35d506f223a2e05931dc3 (patch) | |
tree | 71acdd6a70994fedc0d2d71cdc1c0539e8b8aa7d /modules/youri-check/manifests | |
parent | 4bfba45e78d64412e57bc4b21d4652fbeb079d6c (diff) | |
download | puppet-6861829345e113eb3cc35d506f223a2e05931dc3.tar puppet-6861829345e113eb3cc35d506f223a2e05931dc3.tar.gz puppet-6861829345e113eb3cc35d506f223a2e05931dc3.tar.bz2 puppet-6861829345e113eb3cc35d506f223a2e05931dc3.tar.xz puppet-6861829345e113eb3cc35d506f223a2e05931dc3.zip |
Add new createdb_user function for youri
Diffstat (limited to 'modules/youri-check/manifests')
-rw-r--r-- | modules/youri-check/manifests/init.pp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/modules/youri-check/manifests/init.pp b/modules/youri-check/manifests/init.pp index 30b91171..6ee6461c 100644 --- a/modules/youri-check/manifests/init.pp +++ b/modules/youri-check/manifests/init.pp @@ -49,6 +49,22 @@ class youri-check { } } + + define createdb_user($version) { + $pgsql_db = "youri_check_${version}" + $pgsql_user = "youri${version}" + $pgsql_password = extlookup('youri_pgsql','x') + + postgresql::remote_user { $pgsql_user: + password => $base::pgsql_password, + } + + postgresql::remote_database { $pgsql_db: + description => "Youri Check results", + user => $pgsql_user, + } + } + define check($version, $hour = "*", $minute = 0) { include youri-check::base $config = "/etc/youri/${version}.conf" |