diff options
| author | Dan Fandrich <danf@mageia.org> | 2026-02-21 18:52:35 -0800 |
|---|---|---|
| committer | Dan Fandrich <danf@mageia.org> | 2026-02-21 19:05:59 -0800 |
| commit | 12299baacbdd26b32de99370508b1ae79974240d (patch) | |
| tree | 8819ecaa6f0ebc1d91323922a1898c0057fea27d /modules/mga_mirrors/manifests/init.pp | |
| parent | dff3eec23a755ceb24e758d959f89047263c1039 (diff) | |
| download | puppet-12299baa.tar puppet-12299baa.tar.gz puppet-12299baa.tar.bz2 puppet-12299baa.tar.xz puppet-12299baa.zip | |
Rename module paths to match classes
The refactor in commit e39155d4d changed class names but Puppet 3 seems
to require the module path name to match.
Diffstat (limited to 'modules/mga_mirrors/manifests/init.pp')
| -rw-r--r-- | modules/mga_mirrors/manifests/init.pp | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/modules/mga_mirrors/manifests/init.pp b/modules/mga_mirrors/manifests/init.pp new file mode 100644 index 00000000..8485f0d5 --- /dev/null +++ b/modules/mga_mirrors/manifests/init.pp @@ -0,0 +1,54 @@ +class mga_mirrors { + + $vhost = "mirrors.${::domain}" + $mirrors_dir = '/var/www/mirrors' + + package { 'mga-mirrors': } + + apache::vhost::catalyst_app { $vhost: + script => '/usr/bin/mga_mirrors_fastcgi.pl', + require => Package['mga-mirrors'], + aliases => { + '/status' => '/var/www/mirrors/status.html', + } + } + + apache::vhost::catalyst_app { "ssl_${vhost}": + script => '/usr/bin/mga_mirrors_fastcgi.pl', + require => Package['mga-mirrors'], + vhost => $vhost, + use_ssl => true, + aliases => { + '/status' => '/var/www/mirrors/status.html', + }, + } + + $pgsql_password = extlookup('mga_mirror_pgsql','x') + + postgresql::remote_db_and_user { 'mirrors': + password => $pgsql_password, + description => 'Mirrors database', + } + + file { '/etc/mga-mirrors.ini': + group => 'apache', + mode => '0640', + content => template('mga_mirrors/mga-mirrors.ini'), + require => Package['mga-mirrors'] + } + + file { '/etc/cron.d/check_mga_mirrors': + content => template('mga_mirrors/cron-mga_mirrors'), + require => Package['mga-mirrors'] + } + + file { $mirrors_dir: + ensure => directory, + owner => 'nobody', + } + + file { '/usr/local/bin/check_mirrors_status': + mode => '0755', + source => 'puppet:///modules/mga_mirrors/check_mirrors_status', + } +} |
