Skip to content
Snippets Groups Projects

Resolve "use pdk 2.5.0 and ruby 2.7.5"

Merged Fabien Combernous requested to merge 102-use-pdk-2-5-0-and-ruby-2-7-5 into master
19 files
+ 568
342
Compare changes
  • Side-by-side
  • Inline
Files
19
+ 7
8
@@ -47,7 +47,6 @@ define restic::backup (
String $cron_weekday = '6',
String $cron_monthday = '1',
) {
# put all provided tags (in the title and in the tag attribute) in only one array
$_primarytag = $title
@@ -97,7 +96,7 @@ define restic::backup (
}
)
file {"${_backupscript}-${_primarytag}":
file { "${_backupscript}-${_primarytag}":
ensure => file,
content => epp('restic/restic-backup.sh.epp',
{
@@ -117,7 +116,7 @@ define restic::backup (
case $_repository_type {
'local': {
exec { "check-local-repository-by-user-${runasuser}-for-${_primarytag}":
environment => ["RESTIC_PASSWORD=${repository_password}", ],
environment => ["RESTIC_PASSWORD=${repository_password}"],
path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
command => "restic --repo ${repository_url} snapshots",
user => $runasuser,
@@ -129,7 +128,7 @@ define restic::backup (
$address_resticrepository = regsubst($repository_url, '^sftp:[\d\w]+@([\d\w\.]+):/[^/]+.*','\1')
$dataowner_resticrepository = regsubst($repository_url, '^sftp:([\d\w]+)@[\d\w\.]+:/[^/]+.*','\1')
exec {"check-ssh-connection-to-${dataowner_resticrepository}@${address_resticrepository}-by-user-${runasuser}-for-${_primarytag}":
exec { "check-ssh-connection-to-${dataowner_resticrepository}@${address_resticrepository}-by-user-${runasuser}-for-${_primarytag}":
command => "ssh -oStrictHostKeyChecking=no ${dataowner_resticrepository}@${address_resticrepository}",
path => '/usr/sbin:/usr/bin:/sbin:/bin',
user => $runasuser,
@@ -147,7 +146,7 @@ define restic::backup (
case $cron_frequency {
'hourly': {
cron {"restic-backup-${_primarytag}":
cron { "restic-backup-${_primarytag}":
ensure => present,
environment => "GOGC=${gogc}",
command => $_restic_cron_command,
@@ -159,7 +158,7 @@ define restic::backup (
}
}
'daily': {
cron {"restic-backup-${_primarytag}":
cron { "restic-backup-${_primarytag}":
ensure => present,
environment => "GOGC=${gogc}",
command => $_restic_cron_command,
@@ -171,7 +170,7 @@ define restic::backup (
}
}
'weekly': {
cron {"restic-backup-${_primarytag}":
cron { "restic-backup-${_primarytag}":
ensure => present,
environment => "GOGC=${gogc}",
command => $_restic_cron_command,
@@ -183,7 +182,7 @@ define restic::backup (
}
}
'monthly': {
cron {"restic-backup-${_primarytag}":
cron { "restic-backup-${_primarytag}":
ensure => present,
environment => "GOGC=${gogc}",
command => $_restic_cron_command,
Loading