Monty Taylor d00e7c0e5d Update paths for AFS mirror
In the current setup, the reprepro db and lists dirs are being written
into /root. Move them into AFS so that we store all the data in the same
place.

Also, update the script to point to the confdir for reprepro commands.

Note: This will require a manual move of the current db and lists dirs
from /root to /afs/.openstack.org/mirror/apt before this is run.

Change-Id: I2638621e6af98296704e680227fae174d8a0e541
2016-02-07 09:53:14 -06:00

53 lines
1.1 KiB
Puppet

# == Class: openstack_project::mirror_update
#
class openstack_project::reprepro (
$basedir = '/afs/.openstack.org/mirror/apt',
$logdir = '/var/log/reprepro',
$updates_file = 'puppet:///modules/openstack_project/reprepro/updates',
$options_template = 'openstack_project/reprepro/options.erb',
$distributions_template = 'openstack_project/reprepro/distributions.erb',
$ubuntu_releases = [],
$debian_releases = [],
) {
package { 'reprepro':
ensure => present,
}
file { $logdir:
ensure => directory,
}
file { '/etc/reprepro':
ensure => directory,
}
file { '/var/run/reprepro':
ensure => directory,
}
file { '/etc/reprepro/updates':
ensure => present,
owner => 'root',
group => 'root',
mode => '0755',
source => $updates_file,
}
file { '/etc/reprepro/options':
ensure => present,
owner => 'root',
group => 'root',
mode => '0755',
content => template($options_template),
}
file { '/etc/reprepro/distributions':
ensure => present,
owner => 'root',
group => 'root',
mode => '0755',
content => template($distributions_template),
}
}