dandyrow.linux.swapfile role – Create & setup swapfile

Note

This role is part of the dandyrow.linux collection (version 2.6.0).

To install it use: ansible-galaxy collection install dandyrow.linux.

To use it in a playbook, specify: dandyrow.linux.swapfile.

Entry point main – Create & setup swapfile

Synopsis

  • Create and setup swapfile.

Parameters

Parameter

Comments

swapfile_on

boolean

If true, will activate the swapfile with swapon command.

Choices:

  • false

  • true ← (default)

swapfile_path

string

Path to location of the swapfile.

Default: "/swapfile"

swapfile_size

integer / required

Desired size of swapfile in GiB.

Authors

  • Daniel Lowry (github.com/dandyrow)