|
2 | 2 | # |
3 | 3 | # This class configures the Bacula storage daemon. |
4 | 4 | # |
5 | | -# @param services A list of services to operate; loaded from hiera |
6 | | -# @param packages A list of packages to install; loaded from hiera |
7 | | -# @param ensure What state the package should be in. |
8 | | -# @param conf_dir Path to bacula configuration directory |
9 | | -# @param device The system file name of the storage device managed by this storage daemon |
10 | | -# @param device_mode The posix mode for device |
11 | | -# @param device_name The Name that the Director will use when asking to backup or restore to or from to this device |
12 | | -# @param device_owner The posix user owning the device directory |
13 | | -# @param device_seltype SELinux type for the device |
| 5 | +# @param services A list of services to operate; loaded from hiera |
| 6 | +# @param packages A list of packages to install; loaded from hiera |
| 7 | +# @param ensure What state the package should be in. |
| 8 | +# @param conf_dir Path to bacula configuration directory |
| 9 | +# @param device The system file name of the storage device managed by this storage daemon |
| 10 | +# @param device_mode The posix mode for device |
| 11 | +# @param device_name The Name that the Director will use when asking to backup or restore to or from to this device |
| 12 | +# @param device_owner The posix user owning the device directory |
| 13 | +# @param device_seltype SELinux type for the device |
14 | 14 | # @param device_max_concurrent_jobs The maximum number of Jobs that may run concurrently on the device |
15 | | -# @param director_name Specifies the Name of the Director allowed to connect to the Storage daemon |
16 | | -# @param group The posix group for bacula |
17 | | -# @param homedir The directory in which the Storage daemon may put its status files |
18 | | -# @param listen_address The listening IP addresses for the storage daemon |
| 15 | +# @param director_name Specifies the Name of the Director allowed to connect to the Storage daemon |
| 16 | +# @param group The posix group for bacula |
| 17 | +# @param homedir The directory in which the Storage daemon may put its status files |
| 18 | +# @param listen_address The listening IP addresses for the storage daemon |
19 | 19 | # The notes for `bacula::client::listen_address` apply. |
20 | | -# @param maxconcurjobs DEPRECATED maximum number of Jobs that may run concurrently |
21 | | -# @param max_concurrent_jobs The maximum number of Jobs that may run concurrently |
22 | | -# @param media_type The type of media supported by this device |
23 | | -# @param password Specifies the password that must be supplied by the named Director |
24 | | -# @param port The listening port for the Storage Daemon |
25 | | -# @param rundir The directory in which the Director may put its process Id file files |
26 | | -# @param storage The address to be configured on the director to communicate with this storage server |
27 | | -# @param address The listening address for the Storage Daemon |
28 | | -# @param user The posix user for bacula |
| 20 | +# @param maxconcurjobs DEPRECATED maximum number of Jobs that may run concurrently |
| 21 | +# @param max_concurrent_jobs The maximum number of Jobs that may run concurrently |
| 22 | +# @param media_type The type of media supported by this device |
| 23 | +# @param password Specifies the password that must be supplied by the named Director |
| 24 | +# @param port The listening port for the Storage Daemon |
| 25 | +# @param rundir The directory in which the Director may put its process Id file files |
| 26 | +# @param storage The address to be configured on the director to communicate with this storage server |
| 27 | +# @param address The listening address for the Storage Daemon |
| 28 | +# @param user The posix user for bacula |
29 | 29 | # |
30 | 30 | class bacula::storage ( |
31 | 31 | String[1] $services, |
32 | 32 | Array[String[1]] $packages, |
33 | | - String[1] $ensure = 'present', |
34 | | - Stdlib::Absolutepath $conf_dir = $bacula::conf_dir, |
35 | | - Stdlib::Absolutepath $device = '/bacula', |
36 | | - Stdlib::Filemode $device_mode = '0770', |
37 | | - String[1] $device_name = "${trusted['certname']}-device", |
38 | | - String[1] $device_owner = $bacula::bacula_user, |
39 | | - String[1] $device_seltype = $bacula::device_seltype, |
| 33 | + String[1] $ensure = 'present', |
| 34 | + Stdlib::Absolutepath $conf_dir = $bacula::conf_dir, |
| 35 | + Stdlib::Absolutepath $device = '/bacula', |
| 36 | + Stdlib::Filemode $device_mode = '0770', |
| 37 | + String[1] $device_name = "${trusted['certname']}-device", |
| 38 | + String[1] $device_owner = $bacula::bacula_user, |
| 39 | + String[1] $device_seltype = $bacula::device_seltype, |
40 | 40 | Integer[1] $device_max_concurrent_jobs = 5, |
41 | | - String[1] $director_name = $bacula::director_name, |
42 | | - String[1] $group = $bacula::bacula_group, |
43 | | - Stdlib::Absolutepath $homedir = $bacula::homedir, |
44 | | - Array[String[1]] $listen_address = [], |
45 | | - Optional[Integer[1]] $maxconcurjobs = undef, |
46 | | - Integer[1] $max_concurrent_jobs = 20, |
47 | | - String[1] $media_type = 'File', |
48 | | - Bacula::Password $password = 'secret', |
49 | | - Stdlib::Port $port = 9103, |
50 | | - Stdlib::Absolutepath $rundir = $bacula::rundir, |
51 | | - String[1] $storage = $trusted['certname'], # storage here is not storage_name |
52 | | - String[1] $address = $facts['networking']['fqdn'], |
53 | | - String[1] $user = $bacula::bacula_user, |
| 41 | + String[1] $director_name = $bacula::director_name, |
| 42 | + String[1] $group = $bacula::bacula_group, |
| 43 | + Stdlib::Absolutepath $homedir = $bacula::homedir, |
| 44 | + Array[String[1]] $listen_address = [], |
| 45 | + Optional[Integer[1]] $maxconcurjobs = undef, |
| 46 | + Integer[1] $max_concurrent_jobs = 20, |
| 47 | + String[1] $media_type = 'File', |
| 48 | + Bacula::Password $password = 'secret', |
| 49 | + Stdlib::Port $port = 9103, |
| 50 | + Stdlib::Absolutepath $rundir = $bacula::rundir, |
| 51 | + String[1] $storage = $trusted['certname'], # storage here is not storage_name |
| 52 | + String[1] $address = $facts['networking']['fqdn'], |
| 53 | + String[1] $user = $bacula::bacula_user, |
54 | 54 | ) inherits bacula { |
55 | 55 | if $maxconcurjobs { |
56 | 56 | deprecation('bacula::storage::maxconcurjobs', 'This parameter is deprecated. Use bacula::storage::device_max_concurrent_jobs instead.') |
|
79 | 79 | } |
80 | 80 |
|
81 | 81 | bacula::storage::device { $device_name: |
82 | | - device => $device, |
| 82 | + device => $device, |
83 | 83 | max_concurrent_jobs => pick($maxconcurjobs, $device_max_concurrent_jobs), |
84 | 84 | } |
85 | 85 |
|
|
107 | 107 | } |
108 | 108 |
|
109 | 109 | @@bacula::director::storage { $storage: |
110 | | - address => $address, |
111 | | - port => $port, |
112 | | - password => $password, |
113 | | - device_name => $device_name, |
114 | | - media_type => $media_type, |
| 110 | + address => $address, |
| 111 | + port => $port, |
| 112 | + password => $password, |
| 113 | + device_name => $device_name, |
| 114 | + media_type => $media_type, |
115 | 115 | max_concurrent_jobs => $max_concurrent_jobs, |
116 | | - tag => "bacula-${director_name}", |
| 116 | + tag => "bacula-${director_name}", |
117 | 117 | } |
118 | 118 | } |
0 commit comments