diff --git a/roles/rabbitmq_cluster/tasks/main.yml b/roles/rabbitmq_cluster/tasks/main.yml index b0494d657b..5c220c9e6d 100644 --- a/roles/rabbitmq_cluster/tasks/main.yml +++ b/roles/rabbitmq_cluster/tasks/main.yml @@ -169,7 +169,7 @@ - rabbitmq_cluster - config -- name: Add a policy to limit queues to 1GB and remove after a month of no use +- name: Add a policy to limit queues to 1GB and remove after a month of no use for /pubsub run_once: true delegate_to: "rabbitmq01{{ env_suffix }}.{{ item }}.fedoraproject.org" with_items: "{{ datacenter }}" @@ -188,6 +188,23 @@ - rabbitmq_cluster - config +- name: Add a policy to remove after a week of no use for /bodhi + run_once: true + delegate_to: "rabbitmq01{{ env_suffix }}.{{ item }}.fedoraproject.org" + with_items: "{{ datacenter }}" + rabbitmq_policy: + apply_to: queues + name: bodhi_sweeper + state: present + pattern: ".*" + tags: + # Unused queues are killed after 1000 * 60 * 60 * 7 milliseconds (~a week) + expires: 25200000 + vhost: /bodhi + tags: + - rabbitmq_cluster + - config + - name: Create the admin user for the {{ item }} vhost rabbitmq_user: user: admin