tripleo-validations/roles/rabbitmq_limits/tasks/main.yml
Cédric Jeanneret ceb0f75182
Replace all references to the old role name
This change replaces all of the roles references in our various files with the
new role name. This is being done because Ansible no longer allows hyphens in
role names.

TODO: (gchamoul) Remove healthcheck-service-status once this patch is
merged. Tripleo Jobs are RED due to THT trying to execute this
validation as inflight one but it has been renamed healthcheck_service_status.

Co-Authored-by: Gael Chamoulaud <gchamoul@redhat.com>
Change-Id: I19bb587ece403f86ddd0bbe174c282326500cfd3
2020-01-23 17:25:43 +01:00

21 lines
726 B
YAML

---
- name: Set container_cli fact from the inventory
set_fact:
container_cli: "{{ hostvars[inventory_hostname].container_cli |default('podman', true) }}"
when: container_cli is not defined
- name: Get file_descriptors total_limit
become: true
register: actual_fd_limit
shell: >-
"{{ container_cli }}"
exec $("{{ container_cli }}" ps -q --filter "name=rabbitmq" | head -1)
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"