|
|
|
|
|
|
|
|
{%- from "linux/map.jinja" import storage with context %} |
|
|
{%- from "linux/map.jinja" import storage with context %} |
|
|
{%- if storage.enabled %} |
|
|
{%- if storage.enabled %} |
|
|
|
|
|
|
|
|
|
|
|
{%- if storage.swap.enabled is not defined or storage.swap.enabled %} |
|
|
|
|
|
|
|
|
{%- for swap_name, swap in storage.swap.items() %} |
|
|
{%- for swap_name, swap in storage.swap.items() %} |
|
|
|
|
|
|
|
|
{%- if swap.enabled %} |
|
|
{%- if swap.enabled %} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{%- endfor %} |
|
|
{%- endfor %} |
|
|
|
|
|
|
|
|
|
|
|
{%- elif storage.swap.enabled is defined and not storage.swap.enabled %} |
|
|
|
|
|
|
|
|
|
|
|
linux_disable_swap: |
|
|
|
|
|
cmd.run: |
|
|
|
|
|
- name: 'swapoff -a' |
|
|
|
|
|
|
|
|
|
|
|
{%- endif %} |
|
|
|
|
|
|
|
|
{%- endif %} |
|
|
{%- endif %} |