Let me introduce you to the rdbsync role

This commit is contained in:
Pierre-Yves Chibon 2017-08-11 17:12:27 +02:00
parent d5317702bd
commit 40e85a778a
2 changed files with 40 additions and 0 deletions

View file

@ -0,0 +1,26 @@
---
# Configuration for the rbsync service
- name: install needed packages
yum: pkg={{ item }} state=present
with_items:
- rdbsync
tags:
- packages
- rdbsync
- name: Override the default systemd service file
template: src={{ item.file }}
dest={{ item.location }}/{{ item.file }}
owner=apache group=apache mode=0600
with_items:
- { file: rdbsync.service, location: /etc/systemd/system/ }
tags:
- config
notify:
- restart systemd
- name: Start and enable the service
service: name={{ item }} state=started enabled=yes
with_items:
- rdbsync

View file

@ -0,0 +1,14 @@
[Unit]
Description=A script to sync CentOS CI ResultsDB to Fedora
After=network.target
Documentation=https://github.com/jeremycline/rdbsync
[Service]
ExecStart=/usr/bin/rdbsync run --log-level=INFO --poll-interval=30 \
--centos-url http://resultsdb.ci.centos.org/resultsdb_api/api \
--fedora-url http://localhost/resultsdb_api/
Type=simple
Restart=on-failure
[Install]
WantedBy=multi-user.target