diff --git a/modules/openstack_project/manifests/mirror_update.pp b/modules/openstack_project/manifests/mirror_update.pp index 733532394b..4b4a21828d 100644 --- a/modules/openstack_project/manifests/mirror_update.pp +++ b/modules/openstack_project/manifests/mirror_update.pp @@ -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', } + + } diff --git a/modules/openstack_project/manifests/reprepro_mirror.pp b/modules/openstack_project/manifests/reprepro_mirror.pp new file mode 100644 index 0000000000..5430b1c64a --- /dev/null +++ b/modules/openstack_project/manifests/reprepro_mirror.pp @@ -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, + } +}