From e50f2d7c48967f78bcbc8fce2000af4a88b9abdf Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Tue, 1 Sep 2015 17:54:36 +0000 Subject: [PATCH] Config for the bodhi backend updates_handler. --- roles/bodhi2/base/tasks/main.yml | 1 + roles/bodhi2/base/templates/masher.py | 6 ++++++ roles/bodhi2/base/templates/updates_handler.py | 8 ++++++++ 3 files changed, 15 insertions(+) create mode 100644 roles/bodhi2/base/templates/updates_handler.py diff --git a/roles/bodhi2/base/tasks/main.yml b/roles/bodhi2/base/tasks/main.yml index 1d7ec11b42..78c0a41ab1 100644 --- a/roles/bodhi2/base/tasks/main.yml +++ b/roles/bodhi2/base/tasks/main.yml @@ -70,6 +70,7 @@ - bodhi-threading.py - bodhi.py - masher.py + - updates_handler.py notify: - restart fedmsg-hub tags: diff --git a/roles/bodhi2/base/templates/masher.py b/roles/bodhi2/base/templates/masher.py index 3ed88f6ba3..006fa6e752 100644 --- a/roles/bodhi2/base/templates/masher.py +++ b/roles/bodhi2/base/templates/masher.py @@ -5,7 +5,13 @@ suffix = 'phx2.fedoraproject.org' {% endif %} config = dict( + # Note, the masher runs on bodhi-backend01, while other consumers will run + # on bodhi-backend02. + {% if inventory_hostname.startswith('bodhi-backend01') %} masher=True, + {% else %} + masher=False, + {% endif %} masher_topic='bodhi.masher.start', releng_fedmsg_certname='shell-bodhi-backend01.%s' % suffix, ) diff --git a/roles/bodhi2/base/templates/updates_handler.py b/roles/bodhi2/base/templates/updates_handler.py new file mode 100644 index 0000000000..255d3964e6 --- /dev/null +++ b/roles/bodhi2/base/templates/updates_handler.py @@ -0,0 +1,8 @@ +config = dict( + # TODO -- we're thinking about moving this to bodhi-backend02 + {% if inventory_hostname.startswith('bodhi-backend01') %} + updates_handler=True, + {% else %} + updates_handler=False, + {% endif %} +)