Add swap_options to set mount options #41
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds a
swap_options
variable defaulting to "sw" to preserve the current behaviour. This is used to set the options field in/etc/fstab
and also passed to the initialswapon
.The latter means that this change won't work on, for example, Alpine systems with just BusyBox installed, it requires a full-fat version of
swapon
fromutil-linux-misc
. I can back out that second part, or conditionalise it asswap_swapon_options
vs.swap_mount_options
if you prefer. As Alpine isn't marked as a supported distribution for the role, though, you may not regard it as a problem.Resolves #40.