Skip to content

Instantly share code, notes, and snippets.

@visualskyrim
Created November 27, 2017 02:34
Show Gist options
  • Save visualskyrim/13049bce57d04b34a15eee15be82cd63 to your computer and use it in GitHub Desktop.
Save visualskyrim/13049bce57d04b34a15eee15be82cd63 to your computer and use it in GitHub Desktop.
Ansible: Change ulimit
- hosts: all
become: true
tasks:
- name: configure system settings, file descriptors and number of threads
pam_limits:
domain: ratuser
limit_type: "{{item.limit_type}}"
limit_item: "{{item.limit_item}}"
value: "{{item.value}}"
with_items:
- { limit_type: '-', limit_item: 'nofile', value: 65536 }
- { limit_type: '-', limit_item: 'nproc', value: 65536 }
- { limit_type: 'soft', limit_item: 'memlock', value: unlimited }
- { limit_type: 'hard', limit_item: 'memlock', value: unlimited }
- name: reload settings from all system configuration files
shell: sysctl --system
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment