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:
parent
a167ed03c1
commit
9d764f1631
@ -9,6 +9,7 @@ class openstack_project::mirror_update (
|
|||||||
$centos_keytab = '',
|
$centos_keytab = '',
|
||||||
$epel_keytab = '',
|
$epel_keytab = '',
|
||||||
) {
|
) {
|
||||||
|
include ::openstack_project::reprepro_mirror
|
||||||
|
|
||||||
class { 'openstack_project::server':
|
class { 'openstack_project::server':
|
||||||
sysadmins => $sysadmins,
|
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':
|
file { '/etc/reprepro.keytab':
|
||||||
owner => 'root',
|
owner => 'root',
|
||||||
group => 'root',
|
group => 'root',
|
||||||
@ -129,10 +112,6 @@ class openstack_project::mirror_update (
|
|||||||
source => 'puppet:///modules/openstack_project/reprepro/reprepro-mirror-update.sh',
|
source => 'puppet:///modules/openstack_project/reprepro/reprepro-mirror-update.sh',
|
||||||
}
|
}
|
||||||
|
|
||||||
cron { 'reprepro':
|
|
||||||
ensure => absent,
|
|
||||||
}
|
|
||||||
|
|
||||||
::openstack_project::reprepro { 'ubuntu-reprepro-mirror':
|
::openstack_project::reprepro { 'ubuntu-reprepro-mirror':
|
||||||
confdir => '/etc/reprepro/ubuntu',
|
confdir => '/etc/reprepro/ubuntu',
|
||||||
basedir => '/afs/.openstack.org/mirror/ubuntu',
|
basedir => '/afs/.openstack.org/mirror/ubuntu',
|
||||||
@ -285,4 +264,6 @@ class openstack_project::mirror_update (
|
|||||||
key_type => 'public',
|
key_type => 'public',
|
||||||
key_source => 'puppet:///modules/openstack_project/reprepro/ubuntu-cloud-archive-gpg-key.asc',
|
key_source => 'puppet:///modules/openstack_project/reprepro/ubuntu-cloud-archive-gpg-key.asc',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
23
modules/openstack_project/manifests/reprepro_mirror.pp
Normal file
23
modules/openstack_project/manifests/reprepro_mirror.pp
Normal 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,
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user