summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Kadlčík <frostyx@email.cz>2017-04-11 15:07:47 +0200
committerMiroslav Suchý <msuchy@redhat.com>2017-04-12 08:53:09 +0200
commit60a35821f297dd21c9d4636fe91e187bd95df310 (patch)
tree2ff27751253589cdd4b05b2edd79978350470c2d
parent0d72316392965f10a44727c4b50b0a12f27a8e41 (diff)
downloadansible-60a35821f297dd21c9d4636fe91e187bd95df310.tar.gz
ansible-60a35821f297dd21c9d4636fe91e187bd95df310.tar.xz
ansible-60a35821f297dd21c9d4636fe91e187bd95df310.zip
Use backend IP address from variable
-rw-r--r--roles/copr/backend/tasks/fedmsg.yml2
-rw-r--r--roles/copr/backend/templates/fedmsg.d/mbs.py (renamed from roles/copr/backend/files/fedmsg/mbs.py)4
-rw-r--r--roles/copr/mbs/tasks/main.yml4
3 files changed, 5 insertions, 5 deletions
diff --git a/roles/copr/backend/tasks/fedmsg.yml b/roles/copr/backend/tasks/fedmsg.yml
index cec7c0f64..95ab59c3c 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
index 30723fa61..7e0372874 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 4ac0f8271..1dd1893f8 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"