tripleo-validations/roles/controller_ulimits/tasks/main.yml
Cédric Jeanneret 14411dcb6a
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
(cherry picked from commit ceb0f75182)
2020-02-10 14:51:12 +01:00

29 lines
849 B
YAML

---
- name: Get nofiles limit
become: true
# NOTE: `ulimit` is a shell builtin so we have to invoke it like this:
command: sh -c "ulimit -n"
register: nofilesval
changed_when: false
- name: Check nofiles limit
fail:
msg: >
nofiles is set to {{ nofilesval.stdout }}. It should be at least
{{ nofiles_min }} or higher, depending on available resources.
failed_when: "nofilesval.stdout|int < nofiles_min"
- name: Get nproc limit
become: true
# NOTE: `ulimit` is a shell builtin so we have to invoke it like this:
command: sh -c "ulimit -u"
register: nprocval
changed_when: false
- name: Check nproc limit
fail:
msg: >
nproc is set to {{ nprocval.stdout }}. It should be at least
{{ nproc_min }} or higher, depending on available resources.
failed_when: "nprocval.stdout|int < nproc_min"