Skip to content

Instantly share code, notes, and snippets.

@swist
Created July 25, 2015 15:50
Show Gist options
  • Save swist/835e6be61315e018dd00 to your computer and use it in GitHub Desktop.
Save swist/835e6be61315e018dd00 to your computer and use it in GitHub Desktop.
user fd
- name: set open fd soft and hard limit
lineinfile: dest=/etc/security/limits.conf regexp="{{ item.regexp }}" line="{{ item.line }}" insertbefore="# End of file" state=present
with_items:
- { regexp: '^neo4j\s+soft', line: 'neo4j soft nofile {{ neo4j_nofile_value }}' }
- { regexp: '^neo4j\s+hard', line: 'neo4j hard nofile {{ neo4j_nofile_value }}' }
when: neo4j_update_limits
- name: enable fd soft and hard limit
lineinfile: dest=/etc/pam.d/su regexp='^session\s+require\s+pam_limits' line='session required pam_limits.so' state=present
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment