diff --git a/inventory/host_vars/koji01.phx2.fedoraproject.org b/inventory/host_vars/koji01.phx2.fedoraproject.org index 12a167870d..a5c37932d1 100644 --- a/inventory/host_vars/koji01.phx2.fedoraproject.org +++ b/inventory/host_vars/koji01.phx2.fedoraproject.org @@ -17,3 +17,5 @@ keepalived_ipaddress: 10.5.125.63/24 nrpe_procs_warn: 900 nrpe_procs_crit: 1000 + +fedmsg_koji_instance: primary diff --git a/inventory/host_vars/koji01.stg.phx2.fedoraproject.org b/inventory/host_vars/koji01.stg.phx2.fedoraproject.org index 5d2da78a14..1b7c0573f5 100644 --- a/inventory/host_vars/koji01.stg.phx2.fedoraproject.org +++ b/inventory/host_vars/koji01.stg.phx2.fedoraproject.org @@ -8,3 +8,5 @@ volgroup: /dev/vg_guests eth0_ip: 10.5.126.87 vmhost: virthost10.phx2.fedoraproject.org datacenter: phx2 + +fedmsg_koji_instance: primary diff --git a/inventory/host_vars/koji02.phx2.fedoraproject.org b/inventory/host_vars/koji02.phx2.fedoraproject.org index bbfc927a67..fa275cf0f3 100644 --- a/inventory/host_vars/koji02.phx2.fedoraproject.org +++ b/inventory/host_vars/koji02.phx2.fedoraproject.org @@ -17,3 +17,5 @@ keepalived_ipaddress: 10.5.125.63/24 nrpe_procs_warn: 900 nrpe_procs_crit: 1000 + +fedmsg_koji_instance: primary diff --git a/inventory/host_vars/s390-koji01.qa.fedoraproject.org b/inventory/host_vars/s390-koji01.qa.fedoraproject.org index c8c4b78589..795fa9fc63 100644 --- a/inventory/host_vars/s390-koji01.qa.fedoraproject.org +++ b/inventory/host_vars/s390-koji01.qa.fedoraproject.org @@ -32,3 +32,5 @@ virt_install_command: virt-install -n {{ inventory_hostname }} -r {{ mem_size }} koji_topurl: "http://s390pkgs.fedoraproject.org/" koji_server_url: "http://s390.koji.fedoraproject.org/kojihub" koji_weburl: "http://s390.koji.fedoraproject.org/koji" + +fedmsg_koji_instance: s390 diff --git a/roles/koji_hub/tasks/main.yml b/roles/koji_hub/tasks/main.yml index 3befde1946..9405c901eb 100644 --- a/roles/koji_hub/tasks/main.yml +++ b/roles/koji_hub/tasks/main.yml @@ -69,7 +69,7 @@ - koji_hub - name: koji fedmsg plugin - copy: src=fedmsg-koji-plugin.py dest=/usr/lib/koji-hub-plugins/fedmsg-koji-plugin.py + template: src=fedmsg-koji-plugin.py dest=/usr/lib/koji-hub-plugins/fedmsg-koji-plugin.py notify: - restart httpd tags: diff --git a/roles/koji_hub/files/fedmsg-koji-plugin.py b/roles/koji_hub/templates/fedmsg-koji-plugin.py similarity index 99% rename from roles/koji_hub/files/fedmsg-koji-plugin.py rename to roles/koji_hub/templates/fedmsg-koji-plugin.py index d4e01d460c..0f95fcadfc 100644 --- a/roles/koji_hub/files/fedmsg-koji-plugin.py +++ b/roles/koji_hub/templates/fedmsg-koji-plugin.py @@ -146,7 +146,7 @@ def send_message(cbtype, *args, **kws): # We need this to distinguish between messages from primary koji # and the secondary hubs off for s390 and ppc. - body['instance'] = 'primary' + body['instance'] = '{{ fedmsg_koji_instance }}' # Don't publish these uninformative rpm.sign messages if there's no actual # sigkey present. Koji apparently adds a dummy sig value when rpms are