Skip to content

Commit

Permalink
enhancement: add bacula:client:messages type
Browse files Browse the repository at this point in the history
  • Loading branch information
mi-reichel committed Oct 1, 2024
1 parent 4531492 commit 2f8fc7e
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 48 deletions.
34 changes: 15 additions & 19 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -385,12 +385,8 @@ Default value: `2`

##### <a name="-bacula--client--manage_defaults"></a>`manage_defaults`

Data type: `Boolean`

Setup default message type

Default value: `true`

##### <a name="-bacula--client--director_name"></a>`director_name`

Data type: `String`
Expand Down Expand Up @@ -2194,21 +2190,21 @@ Alias of

```puppet
Struct[{
mname => String,
append => Optional[String],
catalog => Optional[String],
console => Optional[String],
daemon => Optional[String],
director => Optional[String],
mail => Optional[String],
mailcmd => Optional[String],
mailonsuccess => Optional[String],
mailonsuccesscmd => Optional[String],
mailonerror => Optional[String],
mailonerrorcmd => Optional[String],
operator => Optional[String],
operatorcmd => Optional[String],
syslog => Optional[String],
mname => String,
append => Optional[String],
catalog => Optional[String],
console => Optional[String],
daemon => Optional[String],
director => Optional[String],
mail => Optional[String],
mailcmd => Optional[String],
mailonsuccess => Optional[String],
mailonsuccesscmd => Optional[String],
mailonerror => Optional[String],
mailonerrorcmd => Optional[String],
operator => Optional[String],
operatorcmd => Optional[String],
syslog => Optional[String],
}]
```

Expand Down
6 changes: 6 additions & 0 deletions data/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ bacula::director::messages:
console: 'all, !skipped, !saved'
append: '"/var/log/bacula/bacula-dir.log" = all, !skipped'
catalog: 'all'
bacula::client::messages:
Standard-fd:
daemon: 'fd'
mname: 'Standard'
director: "${director_name}-dir = all, !skipped, !restored"
append: '"/var/log/bacula/bacula-fd.log" = all, !skipped'
bacula::director::packages: []

bacula::storage::services: 'bacula-sd'
Expand Down
50 changes: 21 additions & 29 deletions manifests/client.pp
Original file line number Diff line number Diff line change
Expand Up @@ -54,36 +54,28 @@
#
class bacula::client (
Hash[String, Bacula::Message] $messages,
Array[String] $packages,
String $services,
String $default_pool,
Optional[String] $default_pool_full,
Optional[String] $default_pool_inc,
Optional[String] $default_pool_diff,
Integer $port = 9102,
Array[String[1]] $listen_address = [],
String $password = 'secret',
Integer $max_concurrent_jobs = 2,
String $director_name = $bacula::director_name,
Bacula::Yesno $autoprune = true,
Bacula::Time $file_retention = '45 days',
Bacula::Time $job_retention = '6 months',
String $client = $trusted['certname'],
String $address = $facts['networking']['fqdn'],
Boolean $manage_defaults = true,
Optional[Bacula::Yesno] $pki_signatures = undef,
Optional[Bacula::Yesno] $pki_encryption = undef,
Optional[String] $pki_keypair = undef,
Optional[String] $pki_master_key = undef,
Optional[String] $plugin_dir = undef,
Array[String] $packages,
String $services,
String $default_pool,
Optional[String] $default_pool_full,
Optional[String] $default_pool_inc,
Optional[String] $default_pool_diff,
Integer $port = 9102,
Array[String[1]] $listen_address = [],
String $password = 'secret',
Integer $max_concurrent_jobs = 2,
String $director_name = $bacula::director_name,
Bacula::Yesno $autoprune = true,
Bacula::Time $file_retention = '45 days',
Bacula::Time $job_retention = '6 months',
String $client = $trusted['certname'],
String $address = $facts['networking']['fqdn'],
Optional[Bacula::Yesno] $pki_signatures = undef,
Optional[Bacula::Yesno] $pki_encryption = undef,
Optional[String] $pki_keypair = undef,
Optional[String] $pki_master_key = undef,
Optional[String] $plugin_dir = undef,
) inherits bacula {
if $manage_defaults {
bacula::messages { 'Standard-fd':
daemon => 'fd',
director => "${director_name}-dir = all, !skipped, !restored",
append => '"/var/log/bacula/bacula-fd.log" = all, !skipped',
}
}
$group = $bacula::bacula_group
$conf_dir = $bacula::conf_dir
$config_file = "${conf_dir}/bacula-fd.conf"
Expand Down

0 comments on commit 2f8fc7e

Please sign in to comment.