Let me introduce you to the rdbsync role
This commit is contained in:
parent
d5317702bd
commit
40e85a778a
2 changed files with 40 additions and 0 deletions
26
roles/rdbsync/tasks/main.yml
Normal file
26
roles/rdbsync/tasks/main.yml
Normal 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
|
14
roles/rdbsync/templates/rdbsync.service
Normal file
14
roles/rdbsync/templates/rdbsync.service
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue