diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2020-05-07 20:55:39 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2020-05-07 20:55:39 -0300 |
commit | d1533e314ca98f3e19d2c24bac149de5d61d96b4 (patch) | |
tree | d69705ea99bae532cb9e163d7b60947bbd1afb0a | |
parent | a273c148adb5d41a62b1b768d99d73f7db4979df (diff) | |
download | puppet-backup-d1533e314ca98f3e19d2c24bac149de5d61d96b4.tar.gz puppet-backup-d1533e314ca98f3e19d2c24bac149de5d61d96b4.tar.bz2 |
Hiera 5 migration
-rw-r--r-- | manifests/init.pp | 8 | ||||
-rw-r--r-- | manifests/params.pp | 8 | ||||
-rw-r--r-- | manifests/user.pp | 2 |
3 files changed, 9 insertions, 9 deletions
diff --git a/manifests/init.pp b/manifests/init.pp index f4ce07c..fee575c 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -21,10 +21,10 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. class backup( - $when = hiera('backup::when', 'everyday at 01:00'), - $audit_rsync = hiera('backup::audit_rsync', true), - $reportwarning = hiera('backup::reportwarning', true), - $hwinfo = hiera('backup::hwinfo', 'installed') + $when = lookup('backup::when', undef, undef, 'everyday at 01:00'), + $audit_rsync = lookup('backup::audit_rsync', undef, undef, true), + $reportwarning = lookup('backup::reportwarning', undef, undef, true), + $hwinfo = lookup('backup::hwinfo', undef, undef, 'installed') ) { include backup::params diff --git a/manifests/params.pp b/manifests/params.pp index 212fd8e..5c25b1d 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -1,9 +1,9 @@ class backup::params { # backup folder - $backupdir = hiera('backup::dir', "/var/backups") - $backupdir_remote = hiera('backup::dir::remote', "$backupdir/remote") - $backupdir_users = hiera('backup::dir::users', "$backupdir/users") - $backupdir_ensure = hiera('backup::dir::ensure', 'directory') + $backupdir = lookup('backup::dir', undef, undef, "/var/backups") + $backupdir_remote = lookup('backup::dir::remote', undef, undef, "$backupdir/remote") + $backupdir_users = lookup('backup::dir::users', undef, undef, "$backupdir/users") + $backupdir_ensure = lookup('backup::dir::ensure', undef, undef, 'directory') # for data that's going to be encrypted and signed $include_unencrypted = [ "/etc", "/var", "/home", "/root" ] diff --git a/manifests/user.pp b/manifests/user.pp index 3ada103..d31fb3a 100644 --- a/manifests/user.pp +++ b/manifests/user.pp @@ -5,7 +5,7 @@ define backup::user( $ensure = present, $hosting_domain = $::domain, - $sshkey = hiera("'ssh_authorized_key::${name}.${hosting_domain}'"), + $sshkey = lookup("'ssh_authorized_key::${name}.${hosting_domain}'"), ) { user::manage { $name: ensure => $ensure, |