Extend baas2_restoretest class

This commit is contained in:
Patrik Holmqvist 2025-01-15 13:30:28 +01:00
parent 19433e2ea3
commit b42c496cb3
Signed by: pahol
GPG key ID: 5D5B0D4E93F77273
3 changed files with 25 additions and 0 deletions

View file

@ -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:

View file

@ -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')
}
}
}