Puppet Class: bacula::console

Defined in:
manifests/console.pp

Overview

Class: bacula::console

This class manages the bconsole application

Parameters

All bacula+ classes are called from the main <tt>::bacula class. Parameters are documented there.

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.

Parameters:

  • console_template (Any) (defaults to: 'bacula/bconsole.conf.erb')
  • director_password (Any) (defaults to: '')
  • director_server (Any) (defaults to: undef)
  • tls_ca_cert (Any) (defaults to: undef)
  • tls_ca_cert_dir (Any) (defaults to: undef)
  • tls_cert (Any) (defaults to: undef)
  • tls_key (Any) (defaults to: undef)
  • tls_require (Any) (defaults to: 'yes')
  • tls_verify_peer (Any) (defaults to: 'yes')
  • use_tls (Any) (defaults to: false)


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
# File 'manifests/console.pp', line 28

class bacula::console (
  $console_template  = 'bacula/bconsole.conf.erb',
  $director_password = '',
  $director_server   = undef,
  $tls_ca_cert       = undef,
  $tls_ca_cert_dir   = undef,
  $tls_cert          = undef,
  $tls_key           = undef,
  $tls_require       = 'yes',
  $tls_verify_peer   = 'yes',
  $use_tls           = false
) {
  include ::bacula::params

  $director_server_real = $director_server ? {
    undef   => $::bacula::params::director_server_default,
    default => $director_server,
  }

  package { $::bacula::params::console_package:
    ensure => present,
  }

  file { '/etc/bacula/bconsole.conf':
    ensure  => file,
    owner   => 'bacula',
    group   => 'bacula',
    mode    => '0640',
    content => template($console_template),
    require => Package[$::bacula::params::console_package],
  }
}