title: How to increase limit for open processes and files using ansible
body: <p>I am setting up a MySQL server, and I was told to increase the <code>ulimit</code> for the number of open processes.</p>
  
  <p>I ran </p>
  
  <pre><code>- name: "increase limit for the number of open files"
    shell: "ulimit -n 64000"
  - name: "increase limit for the number of open processes"
    shell: "ulimit -u 64000"
  </code></pre>
  
  <p>on the <code>ansible-playbook</code>, but not only does it throw error "Illegal option -u", but also open files limit (-n) doesn't seem to get modified. (I ran <code>ulimit -n</code> on the server but it stays the same)</p>
  
  <p>What is the recommended way of increasing these limits, and how should I do it in Ansible?</p>
  
  <p>I saw <code>pam_limits</code> module. Should I use this module to modify <code>nproc</code> and <code>nofile</code>? If so, which domain?</p>
  
  <p>Thank you.</p>