Bryan Kearney
2008-Dec-16 16:23 UTC
[Ovirt-devel] [PATCH] make use of the user parameter for single execs instead of calling su-
--- ace-ovirt/modules/ovirt/manifests/postgres.pp | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/ace-ovirt/modules/ovirt/manifests/postgres.pp b/ace-ovirt/modules/ovirt/manifests/postgres.pp index 07d053d..1fb45a4 100644 --- a/ace-ovirt/modules/ovirt/manifests/postgres.pp +++ b/ace-ovirt/modules/ovirt/manifests/postgres.pp @@ -44,13 +44,15 @@ class postgres::bundled{ } single_exec {"create_ovirt_db": - command => "/bin/su - postgres -c '/usr/bin/createdb ovirt'", - require => [Exec[postgres_add_all_trust], Service[postgresql]] - } + command => "/usr/bin/createdb ovirt", + require => [Exec[postgres_add_all_trust], Service[postgresql]], + user => "postgres" + } single_exec {"create_ovirt_development_db": - command => "/bin/su - postgres -c '/usr/bin/createdb ovirt_development'", - require => [Exec[postgres_add_all_trust], Service[postgresql]] + command => "/usr/bin/createdb ovirt_development", + require => [Exec[postgres_add_all_trust], Service[postgresql]], + user => "postgres" } postgres_execute_command {"ovirt_db_create_role": -- 1.6.0.4