voxpupuli/puppet-bareos

Automatic catalog creation on mysql doesnt work

Opened this issue · 1 comments

running the following commands fails if the catalog is mysql (probably postgresql as well):
/usr/lib/bareos/scripts/create_bareos_database && /usr/lib/bareos/scripts/make_bareos_tables && /usr/lib/bareos/scripts/grant_bareos_privileges
It requires to pass the credentials to the commands.

This is something which needs to be improved. I think create_bareos_database, grant_bareos can be removed as we should provide usually an user with grants and schema.

For posgresql the script works when run as postgres user (su postgres -c /usr/lib/bareos/scripts/create_bareos_database). Maybe a conditional statement can be added in director.pp to check if DB is postgres and change the exec user to postgres if it is.