
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
78 lines
1.4 KiB
YAML
78 lines
1.4 KiB
YAML
- name: Install reprepro
|
|
package:
|
|
name:
|
|
- reprepro
|
|
state: present
|
|
|
|
- name: Ensure config directory
|
|
file:
|
|
path: /etc/reprepro
|
|
state: directory
|
|
owner: root
|
|
group: root
|
|
mode: '0755'
|
|
|
|
- name: Ensure key storage
|
|
file:
|
|
path: /etc/reprepro-gpg-keys
|
|
state: directory
|
|
owner: root
|
|
group: root
|
|
mode: '0755'
|
|
|
|
- name: Ensure log directory
|
|
file:
|
|
path: /var/log/reprepro
|
|
state: directory
|
|
owner: root
|
|
group: root
|
|
mode: '0755'
|
|
|
|
- name: Ensure run directory
|
|
file:
|
|
path: /var/run/reprepro
|
|
state: directory
|
|
owner: root
|
|
group: root
|
|
mode: '0755'
|
|
|
|
- name: Rotate logfiles
|
|
include_role:
|
|
name: logrotate
|
|
vars:
|
|
logrotate_file_name: '/var/log/reprepro/*'
|
|
logrotate_config_file_name: 'reprepro'
|
|
logrotate_frequency: 'weekly'
|
|
|
|
- name: Install mirror script
|
|
copy:
|
|
src: reprepro-mirror-update.sh
|
|
dest: /usr/local/bin/
|
|
owner: root
|
|
group: root
|
|
mode: 0755
|
|
|
|
- name: Debian
|
|
include_tasks: debian.yaml
|
|
|
|
- name: Debian Ceph
|
|
include_tasks: debian-ceph.yaml
|
|
|
|
- name: Debian security
|
|
include_tasks: debian-security.yaml
|
|
|
|
- name: Docker
|
|
include_tasks: docker.yaml
|
|
|
|
- name: Puppetlabs
|
|
include_tasks: puppetlabs.yaml
|
|
|
|
- name: Ubuntu
|
|
include_tasks: ubuntu.yaml
|
|
|
|
- name: Ubuntu Cloud Archive
|
|
include_tasks: ubuntu-cloud-archive.yaml
|
|
|
|
- name: Ubuntu Ports
|
|
include_tasks: ubuntu-ports.yaml
|