diff --git a/roles/copr/backend/tasks/fedmsg.yml b/roles/copr/backend/tasks/fedmsg.yml index cec7c0f644..95ab59c3cf 100644 --- a/roles/copr/backend/tasks/fedmsg.yml +++ b/roles/copr/backend/tasks/fedmsg.yml @@ -8,7 +8,7 @@ - /etc/fedmsg.d/ssl.py - name: install the MBS config - copy: src="fedmsg/mbs.py" dest=/etc/fedmsg.d/ + template: src="fedmsg.d/mbs.py" dest=/etc/fedmsg.d/ - name: install fedmsg-relay dnf: state=latest name=fedmsg-relay diff --git a/roles/copr/backend/files/fedmsg/mbs.py b/roles/copr/backend/templates/fedmsg.d/mbs.py similarity index 87% rename from roles/copr/backend/files/fedmsg/mbs.py rename to roles/copr/backend/templates/fedmsg.d/mbs.py index 30723fa61a..7e03728747 100644 --- a/roles/copr/backend/files/fedmsg/mbs.py +++ b/roles/copr/backend/templates/fedmsg.d/mbs.py @@ -7,7 +7,7 @@ config = dict( # This is the output side of the relay to which all other # services can listen. "relay_outbound": [ - "tcp://172.25.32.160:4001", + "tcp://{{ copr_backend_ips[0] }}:4001", ], }, @@ -18,6 +18,6 @@ config = dict( # It is also used by the mediawiki php plugin which, due to the oddities of # php, can't maintain a single passive-bind endpoint of it's own. relay_inbound=[ - "tcp://172.25.32.160:2003", + "tcp://{{ copr_backend_ips[0] }}:2003", ], ) diff --git a/roles/copr/mbs/tasks/main.yml b/roles/copr/mbs/tasks/main.yml index 4ac0f8271a..1dd1893f8a 100644 --- a/roles/copr/mbs/tasks/main.yml +++ b/roles/copr/mbs/tasks/main.yml @@ -70,8 +70,8 @@ insertafter: line: "{{ item }}" with_items: - - " config['endpoints']['relay_outbound'].append('tcp://172.25.32.160:4001')" - - " config['relay_inbound'].append('tcp://172.25.32.160:2003')" + - " config['endpoints']['relay_outbound'].append('tcp://{{ copr_backend_ips[0] }}:4001')" + - " config['relay_inbound'].append('tcp://{{ copr_backend_ips[0] }}:2003')" when: env == "staging"