Puppet Class: netbox::database
- Defined in:
- manifests/database.pp
Summary
Sets up the PostgreSQL database for netboxOverview
This class sets up PostgreSQL database. This is optional, you can choose to handle that yourself.
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'manifests/database.pp', line 23
class netbox::database (
String $database_name,
String $database_user,
String $database_password,
String $database_encoding,
String $database_locale,
){
class { 'postgresql::globals':
encoding => $database_encoding,
locale => $database_locale,
}
->class { 'postgresql::server':
}
postgresql::server::db { $database_name:
user => $database_user,
password => postgresql_password($database_name, $database_password),
}
postgresql::server::database_grant { 'user_ALL_on_database':
privilege => 'ALL',
db => $database_name,
role => $database_user,
}
}
|