Validate rabbitmq limits

Change-Id: Ib89c22f9a5a50d2675e2bd37ac7572edbe689983
Co-Authored-By: Martin André <m.andre@redhat.com>
This commit is contained in:
Tomas Sedovic 2016-08-11 12:39:49 +02:00
parent 7456102348
commit 6238fa0184
1 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,19 @@
---
- hosts: controller
vars:
metadata:
name: Rabbitmq limits
description: >
Make sure the rabbitmq file descriptor limits are set to reasonable values.
groups:
- post-deployment
min_fd_limit: 16384
tasks:
- name: Get file_descriptors total_limit
register: actual_fd_limit
command: "rabbitmqctl eval 'proplists:get_value(max_fds, erlang:system_info(check_io)).'"
changed_when: false
- name: Verify the actual limit exceeds the minimal value
fail:
msg: "{{ actual_fd_limit.stdout }} must be greater than or equal to {{ min_fd_limit }}"
failed_when: "{{ actual_fd_limit.stdout|int }} < {{ min_fd_limit }}"