Skip to content

Commit

Permalink
mediawiki: move backup-all-wikis-ia cron to jobrunner class
Browse files Browse the repository at this point in the history
* Only run it where mediawiki::jobqueue::runner::cron is set to true
  • Loading branch information
paladox authored Jan 23, 2025
1 parent 82fac47 commit 1ad7f60
Showing 1 changed file with 0 additions and 42 deletions.
42 changes: 0 additions & 42 deletions modules/mediawiki/manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -35,48 +35,6 @@
}
}

if lookup('jobrunner::intensive', {'default_value' => false}) {
if ($facts['os']['distro']['codename'] == 'bookworm') {
stdlib::ensure_packages(['python3-internetarchive'])
} else {
stdlib::ensure_packages(
'internetarchive',
{
ensure => '3.3.0',
provider => 'pip3',
before => File['/usr/local/bin/iaupload'],
require => Package['python3-pip'],
},
)
}

file { '/usr/local/bin/iaupload':
ensure => present,
mode => '0755',
source => 'puppet:///modules/mediawiki/bin/iaupload.py',
}

file { '/usr/local/bin/backupwikis':
ensure => 'present',
mode => '0755',
source => 'puppet:///modules/mediawiki/bin/backupwikis',
}

file { '/opt/backups':
ensure => directory,
owner => 'www-data',
group => 'www-data',
mode => '0755',
}

cron { 'backup-all-wikis-ia':
ensure => present,
command => '/usr/local/bin/backupwikis /srv/mediawiki/cache/public.php > /var/log/iabackup-backup.log 2>&1',
user => 'www-data',
monthday => ['1'],
}
}

git::clone { '3d2png':
ensure => 'latest',
directory => '/srv/3d2png',
Expand Down

0 comments on commit 1ad7f60

Please sign in to comment.