diff --git a/manifests/archive_command.pp b/manifests/archive_command.pp index 7a07df9..a8e6910 100644 --- a/manifests/archive_command.pp +++ b/manifests/archive_command.pp @@ -9,6 +9,8 @@ # should be fine, so you don't need to change this. # @param barman_user # The default value is the one contained in the 'settings' class. +# @param barman_home +# Home directory # @param barman_server # The value is set when the resource is created # (in the 'autoconfigure' class). diff --git a/manifests/init.pp b/manifests/init.pp index 9e495e2..bb1f989 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -356,7 +356,7 @@ owner => $user, group => $group, mode => $home_mode, - require => Package['barman'] + require => Package['barman'], } if $manage_ssh_host_keys { @@ -380,7 +380,7 @@ exec { 'barman-check-all': command => '/usr/bin/barman check all', subscribe => File[$home], - refreshonly => true + refreshonly => true, } file { '/etc/logrotate.d/barman': @@ -389,7 +389,7 @@ group => $group, mode => '0644', content => template($logrotate_template), - require => Package['barman'] + require => Package['barman'], } # Set the autoconfiguration diff --git a/manifests/postgres.pp b/manifests/postgres.pp index 7c4baa7..2f3df7d 100644 --- a/manifests/postgres.pp +++ b/manifests/postgres.pp @@ -240,7 +240,7 @@ Optional[Integer] $backup_wday = undef, Integer $backup_hour = 4, Integer $backup_minute = 0, - Optional[String] $password = '', + Barman::Password $password = undef, String $server_address = $facts['networking']['fqdn'], Integer $server_port = 5432, String $postgres_server_id = $facts['networking']['hostname'], @@ -300,12 +300,12 @@ # Generate a new password if not defined $real_password = $password ? { - '' => fqdn_rand_string(30,'','fwsfbsfw'), + undef => fqdn_rand_string(30,'','fwsfbsfw'), default => $password, } $archive_mode = $archiver ? { - true => 'on', + true => 'on', default => 'off', } diff --git a/types/password.pp b/types/password.pp new file mode 100644 index 0000000..f4753cf --- /dev/null +++ b/types/password.pp @@ -0,0 +1,7 @@ +type Barman::Password = Optional[ + Variant[ + String, + Sensitive[String], + Integer + ] +]