From 6861829345e113eb3cc35d506f223a2e05931dc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C3=A9cureuil?= Date: Sat, 15 Apr 2017 22:23:26 +0200 Subject: Add new createdb_user function for youri --- modules/youri-check/manifests/init.pp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'modules') 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" -- cgit v1.2.1