Bladeren bron

Allow swap to be completely disabled

pull/215/head
Kyle Gullion 4 jaren geleden
bovenliggende
commit
d76caca091
No account linked to committer's email address
1 gewijzigde bestanden met toevoegingen van 10 en 0 verwijderingen
  1. +10
    -0
      linux/storage/swap.sls

+ 10
- 0
linux/storage/swap.sls Bestand weergeven

@@ -1,6 +1,8 @@
{%- from "linux/map.jinja" import storage with context %}
{%- if storage.enabled %}

{%- if storage.swap.enabled is not defined or storage.swap.enabled %}

{%- for swap_name, swap in storage.swap.items() %}

{%- if swap.enabled %}
@@ -75,4 +77,12 @@ linux_disable_swap_{{ swap.engine }}_{{ swap.device }}:

{%- endfor %}

{%- elif storage.swap.enabled is defined and not storage.swap.enabled %}

linux_disable_swap:
cmd.run:
- name: 'swapoff -a'

{%- endif %}

{%- endif %}

Laden…
Annuleren
Opslaan