X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fbacula%2Fmanifests%2Fclient.pp;h=8fbfb0d3e3e653132d86cbef56629af62d2e177a;hb=6a6f323df04506d53a2d5fb8e30765ec216877d9;hp=879978cfeb3461ac224d32a212e30619bffec430;hpb=ac7237e71c25afe4277e1140e57c142fe8d4a458;p=mirror%2Fdsa-puppet.git diff --git a/modules/bacula/manifests/client.pp b/modules/bacula/manifests/client.pp index 879978cfe..8fbfb0d3e 100644 --- a/modules/bacula/manifests/client.pp +++ b/modules/bacula/manifests/client.pp @@ -1,38 +1,34 @@ class bacula::client inherits bacula { - package { - "bacula-client": ensure => installed; - "bacula-fd": ensure => installed; - } + package { ['bacula-client', 'bacula-fd']: + ensure => installed + } - service { - "bacula-fd": - ensure => running, - enable => true, - hasstatus => true, - require => Package["bacula-fd"]; - } + service { 'bacula-fd': + ensure => running, + enable => true, + hasstatus => true, + require => Package['bacula-fd'] + } - file { - "/etc/bacula/bacula-fd.conf": - content => template("bacula/bacula-fd.conf.erb"), - mode => 640, - owner => root, - group => bacula, - require => Package["bacula-fd"], - notify => Exec["bacula-fd restart"] - ; - } + file { '/etc/bacula/bacula-fd.conf': + content => template('bacula/bacula-fd.conf.erb'), + mode => '0640', + owner => root, + group => bacula, + require => Package['bacula-fd'], + notify => Service['bacula-fd'] + } - exec { - "bacula-fd restart": - path => "/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin", - refreshonly => true; - } + @ferm::rule { 'dsa-bacula-fd-v4': + domain => '(ip)', + description => 'Allow bacula access from storage and director', + rule => "proto tcp mod state state (NEW) dport (bacula-fd) saddr (${bacula_director_address}) ACCEPT", + } - @ferm::rule { 'dsa-bacula-fd': - domain => '(ip)', - description => 'Allow bacula access from storage and director', - rule => "proto tcp mod state state (NEW) dport (bacula-fd) saddr ($bacula_director_address) ACCEPT", - } + @ferm::rule { 'dsa-bacula-fd-v6': + domain => '(ip6)', + description => 'Allow bacula access from storage and director', + rule => "proto tcp mod state state (NEW) dport (bacula-fd) saddr (${bacula_director_address}) ACCEPT", + } }