Skip to content

Oefenweb/ansible-swapfile

This branch is 125 commits ahead of, 10 commits behind kamaln7/ansible-swapfile:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

6a69dd8 · Nov 28, 2024
Nov 28, 2024
Mar 15, 2021
Aug 14, 2014
Mar 15, 2021
Oct 25, 2024
Oct 17, 2024
Nov 28, 2024
Aug 14, 2014
Nov 28, 2024
Mar 15, 2021
Aug 30, 2023
Jul 13, 2015
Jun 24, 2021
Apr 21, 2023
Aug 14, 2014
Nov 2, 2023
Oct 17, 2024
Aug 30, 2023

Repository files navigation

swapfile

CI Ansible Galaxy

Ansible role to manage a swap file in Debian-like systems.

Requirements

  • fallocate (will be installed)

Variables

  • swapfile_size: [default: 1G, false to do nothing]: The size of the swap file to create in the format that fallocate expects: The length and offset arguments may be followed by binary (2^N) suffixes KiB, MiB, GiB, TiB, PiB and EiB (the "iB" is optional, e.g. "K" has the same meaning as "KiB") or decimal (10^N) suffixes KB, MB, GB, PB and EB.
  • swapfile_swappiness: [optional]: The swappiness percentage (vm.swappiness) -- the lower it is, the less your system swaps memory pages
  • swapfile_vfs_cache_pressure: [optional]: This percentage value controls the tendency of the kernel to reclaim the memory which is used for caching of directory and inode objects

Dependencies

None

Example

- hosts: all
  roles:
    - oefenweb.swapfile

or:

- hosts: all
  roles:
    - role: oefenweb.swapfile
      swapfile_size: 1GB
      swapfile_swappiness: 10

License

MIT

Author Information

Mischa ter Smitten (based on work of kamaln7)

Feedback, bug-reports, requests, ...

Are welcome!

About

Ansible role to manage a swap file in Debian-like systems

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Dockerfile 100.0%