Move reprepro bits to reprepro_mirror.pp

This allow reprepro to become shared code, which is needed when we add
reprepro into the post pipeline.

Change-Id: Ia19ad4b1d0b770e93a8be27b4cb39d4d186cb8ac
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2016-07-04 11:50:43 -04:00
parent a167ed03c1
commit 9d764f1631
No known key found for this signature in database
GPG Key ID: 611A80832067AF38
2 changed files with 26 additions and 22 deletions

View File

@ -9,6 +9,7 @@ class openstack_project::mirror_update (
$centos_keytab = '',
$epel_keytab = '',
) {
include ::openstack_project::reprepro_mirror
class { 'openstack_project::server':
sysadmins => $sysadmins,
@ -96,24 +97,6 @@ class openstack_project::mirror_update (
]
}
# TODO(clarkb) this setup needs to go in a class of its own. It is not
# in the define because it is common to all reprepro mirrors.
package { 'reprepro':
ensure => present,
}
file { '/var/log/reprepro':
ensure => directory,
}
file { '/var/run/reprepro':
ensure => directory,
}
file { '/etc/reprepro':
ensure => directory,
}
file { '/etc/reprepro.keytab':
owner => 'root',
group => 'root',
@ -129,10 +112,6 @@ class openstack_project::mirror_update (
source => 'puppet:///modules/openstack_project/reprepro/reprepro-mirror-update.sh',
}
cron { 'reprepro':
ensure => absent,
}
::openstack_project::reprepro { 'ubuntu-reprepro-mirror':
confdir => '/etc/reprepro/ubuntu',
basedir => '/afs/.openstack.org/mirror/ubuntu',
@ -285,4 +264,6 @@ class openstack_project::mirror_update (
key_type => 'public',
key_source => 'puppet:///modules/openstack_project/reprepro/ubuntu-cloud-archive-gpg-key.asc',
}
}

View File

@ -0,0 +1,23 @@
# == Class: openstack_project::reprepro_mirror
#
class openstack_project::reprepro_mirror {
package { 'reprepro':
ensure => present,
}
file { '/var/log/reprepro':
ensure => directory,
}
file { '/var/run/reprepro':
ensure => directory,
}
file { '/etc/reprepro':
ensure => directory,
}
cron { 'reprepro':
ensure => absent,
}
}