mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-03-20 12:07:34 +08:00
check-compose: switch to fedmsg-hub based fedmsg consumer
I'm switching the misc. QA fedmsg consumers over to using fedmsg- hub, due to https://github.com/fedora-infra/fedmsg/issues/365 . So we need to adjust how we install check-compose, install a config file to enable the consumer, and also set up the fedmsg base and hub roles on the openqa server boxes (which do the check-compose job ATM).
This commit is contained in:
@@ -43,6 +43,8 @@
|
||||
roles:
|
||||
- { role: openqa/server, tags: ['openqa_server'] }
|
||||
- { role: openqa/dispatcher, tags: ['openqa_dispatcher'] }
|
||||
- { role: fedmsg/base, tags: ['fedmsg_base'] }
|
||||
- { role: fedmsg/hub, tags: ['fedmsg_hub'] }
|
||||
- { role: check-compose, tags: ['check-compose'] }
|
||||
|
||||
handlers:
|
||||
|
||||
3
roles/check-compose/files/checkcomp_consumer.py
Normal file
3
roles/check-compose/files/checkcomp_consumer.py
Normal file
@@ -0,0 +1,3 @@
|
||||
config = {
|
||||
'checkcomp_consumer.prod.enabled': True,
|
||||
}
|
||||
@@ -62,27 +62,18 @@
|
||||
dest: /root/fedora-qa
|
||||
register: gitqa
|
||||
|
||||
- name: Clean check-compose
|
||||
command: "make prefix=/usr clean"
|
||||
args:
|
||||
chdir: /root/fedora-qa/check-compose
|
||||
when: "gitqa|changed"
|
||||
|
||||
- name: Build check-compose
|
||||
command: "make prefix=/usr"
|
||||
args:
|
||||
chdir: /root/fedora-qa/check-compose
|
||||
when: "gitqa|changed"
|
||||
|
||||
- name: Install check-compose
|
||||
command: "make prefix=/usr install"
|
||||
command: "python setup.py install"
|
||||
args:
|
||||
chdir: /root/fedora-qa/check-compose
|
||||
when: "gitqa|changed"
|
||||
|
||||
- name: Reload systemd config to pick up installed units
|
||||
command: "systemctl daemon-reload"
|
||||
when: "gitqa|changed"
|
||||
- name: Enable fedmsg consumer
|
||||
copy: src=checkcomp_consumer.py dest=/etc/fedmsg.d/checkcomp_consumer.py owner=root group=root mode=0644
|
||||
notify:
|
||||
- restart fedmsg-hub
|
||||
tags:
|
||||
- config
|
||||
|
||||
- name: Install config file
|
||||
template: src=check-compose.conf.j2 dest=/etc/check-compose.conf mode=0644
|
||||
|
||||
Reference in New Issue
Block a user