limits.conf with ansible

[root@localhost ~]# ansible-galaxy init limits.conf - limits.conf was created successfully [root@localhost ~]# ansible-doc pam_limits [root@localhost ~]# vim limits.conf/tasks/main.yml --- # tasks file for limits.conf - pam_limits: domain: "{{ item.domain }}" limit_type: "{{ item.limit_type }}" limit_item: "{{ item.limit_item }}" value: "{{ item.value }}" with_items: "{{ limits_conf_settings }}" [root@localhost ~]# vim limits_conf.yml --- - hosts: all roles: … Continue reading limits.conf with ansible

how to use sysctl with ansible

[root@localhost ~]# sysctl -a |grep vm.swappiness vm.swappiness = 30 [root@localhost ~]# ansible-galaxy init sysctl - sysctl was created successfully [root@localhost ~]# ansible-doc sysctl [root@localhost ~]# vim test.yml --- - hosts: localhost roles: - sysctl vars: sysctl_settings: - name: vm.swappiness value: 90 [root@localhost ~]# vim sysctl/tasks/main.yml --- # tasks file for sysctl - name: sysctl settings … Continue reading how to use sysctl with ansible

How to set ulimit values

1. Soft limit: is the value that the kernel enforces for the corresponding resource. 2. Hard limit: acts as a ceiling for the soft limit. [root@localhost ~]# cat /etc/security/limits.conf # /etc/security/limits.conf # #This file sets the resource limits for the users logged in via PAM. #It does not affect resource limits of the system services. … Continue reading How to set ulimit values