mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-06-14 22:36:09 +08:00
copr: backend: install messaging toml config
This commit is contained in:
@@ -40,6 +40,7 @@ messaging:
|
||||
certificates:
|
||||
- key: copr
|
||||
username: copr
|
||||
app_name: Copr build system
|
||||
|
||||
# Copr vars
|
||||
copr_hostbase: copr-be-dev
|
||||
|
||||
@@ -41,3 +41,10 @@
|
||||
with_items: "{{ messaging.certificates }}"
|
||||
tags:
|
||||
- fedora-messaging
|
||||
|
||||
- name: "copy the toml file for {{ item.username }}"
|
||||
template: src="messaging.toml.j2" dest="/etc/fedora-messaging/{{ item.username }}.toml"
|
||||
owner=root group=root mode=644
|
||||
vars:
|
||||
- msg_username: {{ item.username }}
|
||||
- msg_appname: {{ item.app_name }}
|
||||
|
||||
17
roles/messaging/base/templates/messaging.toml.j2
Normal file
17
roles/messaging/base/templates/messaging.toml.j2
Normal file
@@ -0,0 +1,17 @@
|
||||
amqp_url = "amqps://{{ msg_config.username }}{{ env_suffix }}:@rabbitmq{{ env_suffix }}.fedoraproject.org/%2Fpubsub"
|
||||
|
||||
# The topic_prefix configuration value will add a prefix to the topics of every sent message.
|
||||
# This is used for migrating from fedmsg, and should not be used afterwards.
|
||||
{% if env == "staging" %}
|
||||
topic_prefix = "org.fedoraproject.stg"
|
||||
{% else %}
|
||||
topic_prefix = "org.fedoraproject.prod"
|
||||
{% endif %}
|
||||
|
||||
[tls]
|
||||
ca_cert = "/etc/pki/rabbitmq/{{ msg_username }}/ca.crt"
|
||||
keyfile = "/etc/pki/rabbitmq/{{ msg_username }}/{{ msg_username }}.key"
|
||||
certfile = "/etc/pki/rabbitmq/{{ msg_username }}/{{ msg_username }}.crt"
|
||||
|
||||
[client_properties]
|
||||
app = "{{ msg_appname }}{% if env == "staging" %} - {{ env }}{% endif %}"
|
||||
Reference in New Issue
Block a user