title: Setting multiple values in sysctl with Ansible
body: <p>I have a playbook with several tasks setting values to sysctl. Instead of having a task for each setting, how can I set all the values with one task, using the sysctl module?  </p>
  
  <p>Playbook snippet:</p>
  
  <pre><code>- name: Set tcp_keepalive_probes in sysctl
    become: yes
    sysctl:
      name: net.ipv4.tcp_keepalive_probes
      value: 3
      state: present
      reload: yes
  
  - name: Set tcp_keepalive_intvl in sysctl
    become: yes
    sysctl:
      name: net.ipv4.tcp_keepalive_intvl
      value: 10
      state: present
      reload: yes
  
  - name: Set rmem_default in sysctl
    become: yes
    sysctl:
      name: net.core.rmem_default
      value: 16777216
      state: present
      reload: yes
  </code></pre>