Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/danylevskyi/ansible-role-swap
Ansible Role - Swap
https://github.com/danylevskyi/ansible-role-swap
ansible ansible-role digitalocean role swap
Last synced: 10 days ago
JSON representation
Ansible Role - Swap
- Host: GitHub
- URL: https://github.com/danylevskyi/ansible-role-swap
- Owner: danylevskyi
- License: mit
- Created: 2017-04-30T03:40:07.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-10-23T16:52:55.000Z (over 7 years ago)
- Last Synced: 2024-12-06T11:32:51.238Z (2 months ago)
- Topics: ansible, ansible-role, digitalocean, role, swap
- Homepage: https://galaxy.ansible.com/danylevskyi/ansible-role-swap/
- Size: 6.84 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Ansible Role: Swap
[![Build Status](https://travis-ci.org/danylevskyi/ansible-role-swap.svg?branch=master)](https://travis-ci.org/danylevskyi/ansible-role-swap)
Configure swapfile.
**NOTE:** You have to reboot your server in order to apply all configuration changes.
## Requirements
None.
## Role Variables
Available variables are listed below, along with default values (see `defaults/main.yml`):
swap_path: "/swapfile"
A swapfile location.
swap_dd_bs: 256
Block size. Used by `dd`. Hosts with low RAM may need using smaller block size.
swap_dd_count: 16
Number of blocks. Used by `dd`. Total size (M) of the swapfile equals `swap_dd_bs * swap_dd_count`.
swap_swappiness: 30
Tendency to use swap, 0 = prevent OOM only, 100 = swap often. Default Ubuntu value is `60`. Read more about [swapiness](https://askubuntu.com/a/103916).
swap_vfs_cache_pressure: 50
Tendency of the kernel to reclaim the memory which is used for caching of VFS caches, versus pagecache and swap. Increasing this value increases the rate at which VFS caches are reclaimed.
A list of users who will be added to passwordless sudo group.
## Dependencies
None.
## Example Playbook
- hosts: servers
roles:
- { role: danylevskyi.swap }## TODO
- Add tests.
## License
BSD / MIT
## Author Information
This role was created in 2017 by [Dmytro Danylevskyi](http://dmytro.danylevskyi.com/).