{"id":15059135,"url":"https://github.com/geerlingguy/ansible-role-swap","last_synced_at":"2025-04-13T02:18:14.636Z","repository":{"id":34705338,"uuid":"134508992","full_name":"geerlingguy/ansible-role-swap","owner":"geerlingguy","description":"Ansible Role - Swap","archived":false,"fork":false,"pushed_at":"2025-01-31T03:25:53.000Z","size":32,"stargazers_count":163,"open_issues_count":3,"forks_count":70,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-04T04:31:29.512Z","etag":null,"topics":["ansible","centos","debian","fedora","memory","ram","redhat","role","swap","swapfile","ubuntu"],"latest_commit_sha":null,"homepage":"https://galaxy.ansible.com/geerlingguy/swap/","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/geerlingguy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"geerlingguy","patreon":"geerlingguy"}},"created_at":"2018-05-23T03:34:53.000Z","updated_at":"2025-03-20T19:06:39.000Z","dependencies_parsed_at":"2023-11-24T17:30:38.776Z","dependency_job_id":"3be6b485-9a04-4c46-810c-40c27a7350de","html_url":"https://github.com/geerlingguy/ansible-role-swap","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geerlingguy%2Fansible-role-swap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geerlingguy%2Fansible-role-swap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geerlingguy%2Fansible-role-swap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geerlingguy%2Fansible-role-swap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/geerlingguy","download_url":"https://codeload.github.com/geerlingguy/ansible-role-swap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248654136,"owners_count":21140243,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","centos","debian","fedora","memory","ram","redhat","role","swap","swapfile","ubuntu"],"created_at":"2024-09-24T22:38:26.985Z","updated_at":"2025-04-13T02:18:14.611Z","avatar_url":"https://github.com/geerlingguy.png","language":null,"funding_links":["https://github.com/sponsors/geerlingguy","https://patreon.com/geerlingguy"],"categories":[],"sub_categories":[],"readme":"# Ansible Role: Swap\n\n[![CI](https://github.com/geerlingguy/ansible-role-swap/actions/workflows/ci.yml/badge.svg)](https://github.com/geerlingguy/ansible-role-swap/actions/workflows/ci.yml)\n\nAn Ansible Role that configures swap space on Linux.\n\n## Requirements\n\nNone.\n\n## Role Variables\n\nAvailable variables are listed below, along with default values (see `defaults/main.yml`):\n\n    swap_file_path: /swapfile\n\nThe location of the swap file on the server.\n\n    swap_file_size_mb: '512'\n\nHow large (in mebibytes) to make the swap file.\n\n    swap_swappiness: '60'\n\nThe `vm.swappiness` value to be configured in sysconfig.\n\n    swap_file_state: present\n\nIf you wish to _remove_ your swapfile, and disable swap, set this to `absent`. Generally you'd probably want to set this to `present`.\n\n    swap_file_create_command: \"dd if=/dev/zero of={{ swap_file_path }} bs=1M count={{ swap_file_size_mb }}\"\n\nThe 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`.\n\n## Dependencies\n\nNone.\n\n## Example Playbook\n\n    - hosts: all\n    \n      vars:\n        swap_file_size_mb: '1024'\n    \n      roles:\n        - geerlingguy.swap\n\n## License\n\nMIT / BSD\n\n## Author Information\n\nThis role was created in 2018 by [Jeff Geerling](https://www.jeffgeerling.com/), author of [Ansible for DevOps](https://www.ansiblefordevops.com/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeerlingguy%2Fansible-role-swap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeerlingguy%2Fansible-role-swap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeerlingguy%2Fansible-role-swap/lists"}