diff --git a/global/overlay/etc/puppet/cosmos-rules.yaml b/global/overlay/etc/puppet/cosmos-rules.yaml index 2270d1c..25e4998 100644 --- a/global/overlay/etc/puppet/cosmos-rules.yaml +++ b/global/overlay/etc/puppet/cosmos-rules.yaml @@ -27,6 +27,8 @@ invent_retention_days: 1 baas2-backuptest-prod-1.sunet.se: + net::baas2_restoretest: + node_type: 'backupnode' sunet::baas2: nodename: 378A9E0ADCC5 backup_dirs: diff --git a/baas2-backuptest-prod-1.sunet.se/overlay/opt/backuptest/gen-backup-files b/global/overlay/etc/puppet/modules/net/files/baas2_restoretest/gen-backup-files similarity index 100% rename from baas2-backuptest-prod-1.sunet.se/overlay/opt/backuptest/gen-backup-files rename to global/overlay/etc/puppet/modules/net/files/baas2_restoretest/gen-backup-files diff --git a/global/overlay/etc/puppet/modules/net/manifests/baas2_restoretest.pp b/global/overlay/etc/puppet/modules/net/manifests/baas2_restoretest.pp index c995cab..66a6571 100644 --- a/global/overlay/etc/puppet/modules/net/manifests/baas2_restoretest.pp +++ b/global/overlay/etc/puppet/modules/net/manifests/baas2_restoretest.pp @@ -5,6 +5,13 @@ class net::baas2_restoretest( Enum['backupnode', 'restorenode'] $node_type = undef, ) { + file { '/opt/baas2': + ensure => directory, + mode => '0755', + owner => 'root', + group => 'root', + } + if $node_type == 'restorenode' { file { '/opt/restore-target': ensure => directory, @@ -14,4 +21,20 @@ class net::baas2_restoretest( } } + if $node_type == 'backupnode' { + file { '/opt/backup-test': + ensure => directory, + mode => '0755', + owner => 'root', + group => 'root', + } + + file { '/opt/baas2/gen-backup-files': + ensure => 'file', + mode => '0755', + owner => 'root', + content => file('net/baas2_restoretest/gen-backup-files') + } + } + }