Merge "Add controller-ulimits role"
This commit is contained in:
commit
38c74eb90b
13
playbooks/controller-ulimits.yaml
Normal file
13
playbooks/controller-ulimits.yaml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
---
|
||||||
|
- hosts: Controller
|
||||||
|
vars:
|
||||||
|
metadata:
|
||||||
|
name: Check controller ulimits
|
||||||
|
description: >
|
||||||
|
This will check the ulimits of each controller.
|
||||||
|
groups:
|
||||||
|
- post-deployment
|
||||||
|
nofiles_min: 1024
|
||||||
|
nproc_min: 2048
|
||||||
|
roles:
|
||||||
|
- controller-ulimits
|
3
roles/controller-ulimits/defaults/main.yml
Normal file
3
roles/controller-ulimits/defaults/main.yml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
nofiles_min: 1024
|
||||||
|
nproc_min: 2048
|
27
roles/controller-ulimits/meta/main.yml
Normal file
27
roles/controller-ulimits/meta/main.yml
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
galaxy_info:
|
||||||
|
author: TripleO Validations Team
|
||||||
|
company: Red Hat
|
||||||
|
license: Apache
|
||||||
|
min_ansible_version: 2.4
|
||||||
|
|
||||||
|
platforms:
|
||||||
|
- name: CentOS
|
||||||
|
versions:
|
||||||
|
- 7
|
||||||
|
- name: RHEL
|
||||||
|
versions:
|
||||||
|
- 7
|
||||||
|
|
||||||
|
categories:
|
||||||
|
- cloud
|
||||||
|
- baremetal
|
||||||
|
- system
|
||||||
|
galaxy_tags: []
|
||||||
|
# List tags for your role here, one per line. A tag is a keyword that describes
|
||||||
|
# and categorizes the role. Users find roles by searching for tags. Be sure to
|
||||||
|
# remove the '[]' above, if you add tags to this list.
|
||||||
|
#
|
||||||
|
# NOTE: A tag is limited to a single word comprised of alphanumeric characters.
|
||||||
|
# Maximum 20 tags per role.
|
||||||
|
|
||||||
|
dependencies: []
|
28
roles/controller-ulimits/tasks/main.yml
Normal file
28
roles/controller-ulimits/tasks/main.yml
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
---
|
||||||
|
- 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"
|
7
roles/controller-ulimits/vars/main.yml
Normal file
7
roles/controller-ulimits/vars/main.yml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
metadata:
|
||||||
|
name: Check controller ulimits
|
||||||
|
description: >
|
||||||
|
This will check the ulimits of each controller.
|
||||||
|
groups:
|
||||||
|
- post-deployment
|
Loading…
Reference in New Issue
Block a user