From 2207dbcf11bba703c2ff347d145fc3358640530c Mon Sep 17 00:00:00 2001 From: thomashaw Date: Wed, 23 Mar 2022 19:42:12 +0000 Subject: [PATCH] add db user --- .../analysis_alert_action_server/manifests/config.pp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/services/unix/logging/analysis_alert_action_server/manifests/config.pp b/modules/services/unix/logging/analysis_alert_action_server/manifests/config.pp index d5579f8dc..5468048e0 100644 --- a/modules/services/unix/logging/analysis_alert_action_server/manifests/config.pp +++ b/modules/services/unix/logging/analysis_alert_action_server/manifests/config.pp @@ -11,6 +11,12 @@ class analysis_alert_action_server::config ( ensure => 'running', } + user{ $db_username: + ensure => present, + gid => $_group, + password => pw_hash($db_password, 'SHA-512', 'mysalt'), + } + ## Moving across the shell script which setups the database file { "$install_path/lib/postgresql_setup.sh": owner => root, @@ -26,6 +32,7 @@ class analysis_alert_action_server::config ( cwd => $install_path, command => "sudo ./lib/postgresql_setup.sh $db_username $db_password", path => [ '/bin/', '/sbin/' , '/usr/bin/', '/usr/sbin/' ], + require => User[$db_username], } # Configure alert_router