reprepro: convert to Ansible
This converts the reprepro configuration from our existing puppet to Ansible. This takes a more direct approach; the templating done by the puppet version started simple but over the years grew several different options to handle various use-cases. This means you not only had to understand the rather obscure reprepro configuration, but then *also* figure out how to translate that from our puppet template layers. Here the configuration files are kept directly (they were copied from the existing mirror-update.openstack.org) and deployed with some light wrapper tasks in reprepro/tasks/utils which avoids most duplication. Note the initial cron jobs are left disabled so we can run some manual testing before letting it go automatically. Change-Id: I96a9ff1efbf51c4164621028b7a3a1e2e1077d5c
This commit is contained in:
@@ -70,3 +70,42 @@ def test_afsmon_installed(host):
|
||||
|
||||
f = host.file('/etc/afsmon.cfg')
|
||||
assert f.exists
|
||||
|
||||
# reprepro
|
||||
|
||||
def test_repro_general_conf(host):
|
||||
package = host.package('reprepro')
|
||||
assert package.is_installed
|
||||
|
||||
f = host.file('/etc/reprepro')
|
||||
assert f.exists
|
||||
assert f.is_directory
|
||||
|
||||
f = host.file('/var/log/reprepro')
|
||||
assert f.exists
|
||||
assert f.is_directory
|
||||
|
||||
f = host.file('/usr/local/bin/reprepro-mirror-update.sh')
|
||||
assert f.exists
|
||||
|
||||
f = host.file('/etc/logrotate.d/reprepro')
|
||||
assert f.exists
|
||||
|
||||
def test_reprepro_configs(host):
|
||||
|
||||
dirs = ('apt-puppetlabs',
|
||||
'debian',
|
||||
'debian-security',
|
||||
'debian-ceph-octopus',
|
||||
'debian-ceph-nautilus',
|
||||
'debian-docker-xenial',
|
||||
'debian-docker-bionic',
|
||||
'debian-docker-focal',
|
||||
'ubuntu',
|
||||
'ubuntu-cloud-archive',
|
||||
'ubuntu-ports')
|
||||
|
||||
for d in dirs:
|
||||
for config in ('distributions', 'options', 'updates'):
|
||||
f = host.file('/etc/reprepro/%s/%s' % (d, config))
|
||||
assert f.exists
|
||||
|
Reference in New Issue
Block a user