21 lines
688 B
YAML
21 lines
688 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 'sysctl -n fs.file-max'
|
|
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"
|