Merge "Validate rabbitmq limits"

This commit is contained in:
Jenkins 2016-09-09 08:40:55 +00:00 committed by Gerrit Code Review
commit c3fc47a29c
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 }}"