{"repo":"geerlingguy/ansible-role-swap","free":true,"listed":false,"github":"https://github.com/geerlingguy/ansible-role-swap","clone":"git clone https://github.com/geerlingguy/ansible-role-swap.git","description":"Ansible Role - Swap","language":null,"stars":181,"topics":["ansible","role","swap","swapfile","memory","ram","ubuntu","redhat","fedora","centos"],"license":"MIT","category":"deployment-docker-iac","readme_excerpt":"Ansible Role: Swap An Ansible Role that configures swap space on Linux. Requirements None. Role Variables Available variables are listed below, along with default values (see defaults/main.yml ): swap file path: /swapfile The location of the swap file on the server. swap file size mb: '512' How large (in mebibytes) to make the swap file. swap swappiness: '60' The vm.swappiness value to be configured in sysconfig. swap sysctl file: /etc/sysctl.d/90-swap.conf The sysctl file used to persist vm.swappiness . swap file state: present If you wish to remove your swapfile, and disable swap, set this to absent . Generally you'd probably want to set this to present . swap file create command: \"dd if=/dev/zero of={{ swap file path }} bs=1M count={{ swap file size mb }}\" The command used to create the swap file. You could switch to using fallocate to write the swap file more quickly, though there may be inconsistencies if not writing the file with dd . Dependencies None. Example Playbook - hosts: all vars: swap file size mb: '1024' roles: - geerlingguy.swap License MIT / BSD Author Information This role was created in 2018 by Jeff Geerling, author of Ansible for DevOps.","default_branch":null,"files":null,"tree":[],"storefront":"/r/geerlingguy","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/geerlingguy/ansible-role-swap/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}