https://github.com/savoirfairelinux/ansible-swapfile
Easily edit and deploy simple SWAP space into your server on the fly with high-availability.
https://github.com/savoirfairelinux/ansible-swapfile
Last synced: about 1 month ago
JSON representation
Easily edit and deploy simple SWAP space into your server on the fly with high-availability.
- Host: GitHub
- URL: https://github.com/savoirfairelinux/ansible-swapfile
- Owner: savoirfairelinux
- License: gpl-3.0
- Created: 2017-02-22T20:30:12.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-08-01T13:58:34.000Z (almost 8 years ago)
- Last Synced: 2024-12-26T18:23:16.460Z (6 months ago)
- Size: 19.5 KB
- Stars: 1
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Ansible Swap File Role
============Easily edit and deploy simple SWAP space into your server on the fly with high-availability.
How does this works ?
------------You can install it or change the swap file size whenever you need without the need of rebooting.
When you change the size of swap (or install the role then provision) there's what happens :
1. Creates new swap file with the new specified size, then enable it
2. Transfert the old swap file contents to the new one
3. Delete the old swap file to free space on the hard driveSafety first
------------When you change the swap file size, while transferring swap pages into the new one, it can cause temporary hard drive load and server latency, but not much.
If you want to change the swap file size, we do recommend to wait when the server's load is relatively low.
System requirements
------------* Any Linux-family operating system (Debian, CentOS etc..)
* Ansible 2.0+ installed on the deployment hostInstallation procedure
------------Simply add this role into your Ansible file, change the "swapfile_size_mb" (in megabytes) as your need, and then run provision.
```
---
- hosts: all
roles:
- role: swapfile
swapfile_size_mb: 512```