From: Peter Palfrader Date: Tue, 24 Sep 2019 05:58:59 +0000 (+0200) Subject: whitespace/quoting: modules/bacula/manifests/* (make lint happy) X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=074f447f617f7b3cbb9dce3018d6f115ef886d77;p=mirror%2Fdsa-puppet.git whitespace/quoting: modules/bacula/manifests/* (make lint happy) --- diff --git a/modules/bacula/manifests/client.pp b/modules/bacula/manifests/client.pp index ebc3e5c6d..08502b71d 100644 --- a/modules/bacula/manifests/client.pp +++ b/modules/bacula/manifests/client.pp @@ -3,7 +3,7 @@ # this mostly configures the file daemon, but also firewall rules and # fragments to sent to the other servers. class bacula::client( - Enum['present', 'absent'] $ensure = defined(Class["bacula::not_a_client"]) ? { true => 'absent', default => 'present' }, + Enum['present', 'absent'] $ensure = defined(Class['bacula::not_a_client']) ? { true => 'absent', default => 'present' }, ) inherits bacula { $package_ensure = $ensure ? { 'present' => 'installed', 'absent' => 'purged' } $service_ensure = $ensure ? { 'present' => 'running', 'absent' => 'stopped' } @@ -17,10 +17,10 @@ class bacula::client( bacula_client_port => $bacula::bacula_client_port, } - @@concat::fragment { "bacula-dsa-client-list::$fqdn": + @@concat::fragment { "bacula-dsa-client-list::${::fqdn}": target => $bacula::bacula_dsa_client_list , content => @("EOF"), - ${fqdn} + ${::fqdn} | EOF tag => $bacula::tag_bacula_dsa_client_list, } @@ -34,8 +34,8 @@ class bacula::client( } ensure_packages ( [ - 'bacula-fd', - 'bacula-common', + 'bacula-fd', + 'bacula-common', ], { ensure => $package_ensure }) @@ -51,7 +51,7 @@ class bacula::client( path => '/usr/bin:/usr/sbin:/bin:/sbin', command => 'sh -c "setsid /usr/local/sbin/bacula-idle-restart fd &"', refreshonly => true, - subscribe => [ File[$bacula_ssl_server_cert], File[$bacula_ssl_client_cert] ], + subscribe => [ File[$bacula::bacula_ssl_server_cert], File[$bacula::bacula_ssl_client_cert] ], require => File['/usr/local/sbin/bacula-idle-restart'], } @@ -65,14 +65,14 @@ class bacula::client( notify => Exec['bacula-fd restart-when-idle'], } file { '/usr/local/sbin/bacula-backup-dirs': - ensure => $ensure, - mode => '0775', - source => 'puppet:///modules/bacula/bacula-backup-dirs', + ensure => $ensure, + mode => '0775', + source => 'puppet:///modules/bacula/bacula-backup-dirs', } file { '/usr/local/sbin/postbaculajob': - ensure => $ensure, - mode => '0775', - source => 'puppet:///modules/bacula/postbaculajob', + ensure => $ensure, + mode => '0775', + source => 'puppet:///modules/bacula/postbaculajob', } file { '/etc/default/bacula-fd': ensure => $ensure, @@ -83,7 +83,7 @@ class bacula::client( require => Package['bacula-fd'], notify => Service['bacula-fd'], } - if (versioncmp($::lsbmajdistrelease, '9') >= 0 and $systemd) { + if (versioncmp($::lsbmajdistrelease, '9') >= 0 and $facts['systemd']) { dsa_systemd::override { 'bacula-fd': content => @(EOT) [Service] @@ -100,6 +100,6 @@ class bacula::client( ferm::rule { 'dsa-bacula-fd': domain => '(ip ip6)', description => 'Allow bacula access from storage and director', - rule => "proto tcp mod state state (NEW) dport (${bacula_client_port}) saddr (${bacula_director_ip_addrs}) ACCEPT", + rule => "proto tcp mod state state (NEW) dport (${bacula::bacula_client_port}) saddr (${bacula::bacula_director_ip_addrs}) ACCEPT", } } diff --git a/modules/bacula/manifests/init.pp b/modules/bacula/manifests/init.pp index 218645ff6..3ec270d3f 100644 --- a/modules/bacula/manifests/init.pp +++ b/modules/bacula/manifests/init.pp @@ -38,6 +38,6 @@ class bacula ( ) { file { '/usr/local/sbin/bacula-idle-restart': mode => '0555', - content => template('bacula/bacula-idle-restart.erb'), + content => template('bacula/bacula-idle-restart.erb'), } } diff --git a/modules/bacula/manifests/storage.pp b/modules/bacula/manifests/storage.pp index 09f0d0de8..97dc4244d 100644 --- a/modules/bacula/manifests/storage.pp +++ b/modules/bacula/manifests/storage.pp @@ -21,7 +21,7 @@ class bacula::storage inherits bacula { path => '/usr/bin:/usr/sbin:/bin:/sbin', command => 'sh -c "setsid /usr/local/sbin/bacula-idle-restart sd &"', refreshonly => true, - subscribe => File[$bacula_ssl_server_cert], + subscribe => File[$bacula::bacula_ssl_server_cert], require => File['/usr/local/sbin/bacula-idle-restart'], } @@ -58,7 +58,7 @@ class bacula::storage inherits bacula { notify => Exec['bacula-sd restart-when-idle'] } - file { "${bacula_backup_path}/Catalog": + file { "${bacula::bacula_backup_path}/Catalog": ensure => directory, mode => '0755', owner => bacula, diff --git a/modules/bacula/manifests/storage_per_node.pp b/modules/bacula/manifests/storage_per_node.pp index 2ed19a333..d11ac034d 100644 --- a/modules/bacula/manifests/storage_per_node.pp +++ b/modules/bacula/manifests/storage_per_node.pp @@ -1,28 +1,28 @@ # bacula storage for node. This is stored config by a client, collected on the storage define bacula::storage_per_node() { - include bacula + include bacula - $bacula_filestor_device = $bacula::bacula_filestor_device - $bacula_filestor_name = $bacula::bacula_filestor_name - $bacula_backup_path = $bacula::bacula_backup_path + $bacula_filestor_device = $bacula::bacula_filestor_device + $bacula_filestor_name = $bacula::bacula_filestor_name + $bacula_backup_path = $bacula::bacula_backup_path - $bacula_client_name = "${name}-fd" - $client = $name + $bacula_client_name = "${name}-fd" + $client = $name - file { - "/etc/bacula/storage-conf.d/${name}.conf": - content => template('bacula/storage-per-client.conf.erb'), - mode => '0440', - group => bacula, - notify => Exec['bacula-sd restart-when-idle'], - ; - "${bacula_backup_path}/${name}": - ensure => directory, - mode => '0755', - owner => bacula, - group => bacula, - ; - } + file { + "/etc/bacula/storage-conf.d/${name}.conf": + content => template('bacula/storage-per-client.conf.erb'), + mode => '0440', + group => bacula, + notify => Exec['bacula-sd restart-when-idle'], + ; + "${bacula_backup_path}/${name}": + ensure => directory, + mode => '0755', + owner => bacula, + group => bacula, + ; + } }