bacula: Changed storage daemon to run as bacula user instead of root and converted tape alerts to use custom script.
This commit is contained in:
parent
f3ad618caa
commit
9c3f13701a
3 changed files with 60 additions and 6 deletions
|
@ -358,6 +358,23 @@ class bacula::storage($password = undef) {
|
|||
before => Class["bacula::certificates"],
|
||||
}
|
||||
|
||||
file { "/etc/sysconfig/bacula-sd":
|
||||
ensure => present,
|
||||
content => "SD_USER=bacula\nSD_GROUP=bacula\n",
|
||||
mode => "0644",
|
||||
owner => "root",
|
||||
group => "root",
|
||||
require => Package["bacula-storage"],
|
||||
notify => Service["bacula-sd"],
|
||||
}
|
||||
exec { "usermod-bacula":
|
||||
path => "/bin:/usr/bin:/sbin:/usr/sbin",
|
||||
command => "usermod -a -G tape bacula",
|
||||
unless => "id -n -G bacula | grep '\\btape\\b'",
|
||||
require => Package["bacula-storage"],
|
||||
before => Service["bacula-sd"],
|
||||
}
|
||||
|
||||
file { "/etc/bacula/bacula-sd.conf":
|
||||
ensure => present,
|
||||
content => template("bacula/bacula-sd.conf.erb"),
|
||||
|
@ -408,10 +425,7 @@ class bacula::storage($password = undef) {
|
|||
define bacula::device($device, $media) {
|
||||
|
||||
include bacula::storage
|
||||
require smart
|
||||
package { "mtx":
|
||||
ensure => installed,
|
||||
}
|
||||
require bacula::device::common
|
||||
|
||||
file { "/etc/bacula/bacula-sd.d/${name}.conf":
|
||||
ensure => present,
|
||||
|
@ -435,6 +449,24 @@ define bacula::device($device, $media) {
|
|||
}
|
||||
|
||||
|
||||
class bacula::device::common {
|
||||
|
||||
require smart
|
||||
package { "mtx":
|
||||
ensure => installed,
|
||||
}
|
||||
|
||||
file { "/usr/local/sbin/tapealert":
|
||||
ensure => present,
|
||||
source => "puppet:///modules/bacula/tapealert",
|
||||
mode => "0755",
|
||||
owner => "root",
|
||||
group => "root",
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
# Install Bacula web interface
|
||||
#
|
||||
# === Parameters
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue