Puppet Class: bacula::director::sqlite
- Defined in:
- manifests/director/sqlite.pp
Overview
Class: bacula::director::sqlite
Manage SQLite resources for the Bacula director
Parameters
All bacula+ classes are called from the main <tt>::bacula
class. Parameters are documented there.
Copyright
Copyright 2012 Russell Harrison
License
Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'manifests/director/sqlite.pp', line 28
class bacula::director::sqlite (
$db_database = 'bacula'
){
sqlite::db { $db_database:
ensure => present,
location => "/var/lib/bacula/${db_database}.db",
owner => 'bacula',
group => 'bacula',
require => File['/var/lib/bacula'],
notify => Exec['make_db_tables'],
}
file { '/usr/local/libexec/bacula':
ensure => directory,
owner => 'root',
group => 'root',
mode => '0755',
}
file { '/usr/local/libexec/bacula/make_sqlite3_tables.sh':
ensure => file,
owner => 'root',
group => 'root',
mode => '0755',
content => template('bacula/make_sqlite3_tables.sh.erb'),
require => Package[$::bacula::params::director_sqlite_package],
}
$make_db_tables_command = $::operatingsystem ? {
/(Ubuntu|Debian)/ => '/usr/lib/bacula/make_bacula_tables',
default => '/usr/local/libexec/bacula/make_sqlite3_tables.sh',
}
exec { 'make_db_tables':
command => $make_db_tables_command,
refreshonly => true,
require => File['/usr/local/libexec/bacula/make_sqlite3_tables.sh'],
notify => Service['bacula-dir'],
}
}
|