diff --git a/roles/copr/mbs/tasks/main.yml b/roles/copr/mbs/tasks/main.yml index 536a784dc9..c683ca9353 100644 --- a/roles/copr/mbs/tasks/main.yml +++ b/roles/copr/mbs/tasks/main.yml @@ -52,7 +52,7 @@ - /etc/fedmsg.d/ssl.py - name: setup module_build_service - copy: src=module_build_service.py dest=/etc/fedmsg.d/module_build_service.py mode=0644 user=root group=root + template: src=module_build_service.py dest=/etc/fedmsg.d/module_build_service.py mode=0644 user=root group=root - name: Listen to copr-be-dev lineinfile: diff --git a/roles/copr/mbs/files/module_build_service.py b/roles/copr/mbs/templates/module_build_service.py similarity index 83% rename from roles/copr/mbs/files/module_build_service.py rename to roles/copr/mbs/templates/module_build_service.py index b12d8d5725..dd227c0057 100644 --- a/roles/copr/mbs/files/module_build_service.py +++ b/roles/copr/mbs/templates/module_build_service.py @@ -13,7 +13,11 @@ config = { "endpoints": { "fedora-infrastructure": [ # Just listen to staging for now, not to production (spam!) +{% if inventory_hostname.startswith('copr-fe.cloud') %} "tcp://hub.fedoraproject.org:9940" +{% else %} +#"tcp://stg.fedoraproject.org:9940" +{% endif %} ], }, @@ -43,6 +47,10 @@ if 'MODULE_BUILD_SERVICE_DEVELOPER_ENV' in os.environ and \ config['relay_inbound'] = ["tcp://fedmsg-relay:2003"] else: # These configuration values are reasonable for most other configurations. +{% if inventory_hostname.startswith('copr-fe.cloud') %} config['endpoints']['relay_outbound'] = ["tcp://127.0.0.1:4001"] config['relay_inbound'] = ["tcp://127.0.0.1:2003"] - +{% else %} + config['endpoints']['relay_outbound'].append('tcp://172.25.32.175:4001') + config['relay_inbound'].append('tcp://172.25.32.175:2003') +{% endif %}