diff --git a/roles/fedmsg/base/tasks/main.yml b/roles/fedmsg/base/tasks/main.yml index 53376d7756..08fea66041 100644 --- a/roles/fedmsg/base/tasks/main.yml +++ b/roles/fedmsg/base/tasks/main.yml @@ -34,6 +34,7 @@ - ssl.py - endpoints.py - endpoints-fedocal.py + - endpoints-elections.py - endpoints-fedbadges.py - endpoints-fmn-web.py - endpoints-nuancier.py diff --git a/roles/fedmsg/base/templates/endpoints-elections.py.j2 b/roles/fedmsg/base/templates/endpoints-elections.py.j2 new file mode 100644 index 0000000000..6d2db79055 --- /dev/null +++ b/roles/fedmsg/base/templates/endpoints-elections.py.j2 @@ -0,0 +1,20 @@ +{% if env == 'staging' %} +suffix = 'stg.phx2.fedoraproject.org' +{% else %} +suffix = 'phx2.fedoraproject.org' +{% endif %} + +config = dict( + endpoints={ + "fedora_elections.elections01": [ + "tcp://elections01.%s:30%02i" % (suffix, i) + for i in range(2) + ], +{% if env != 'staging' %} + "fedora_elections.elections02": [ + "tcp://elections02.%s:30%02i" % (suffix, i) + for i in range(2) + ], +{% endif %} + }, +)