swap
This commit is contained in:
parent
350e59322c
commit
54b8cb884d
1 changed files with 1 additions and 6 deletions
|
@ -18,12 +18,7 @@
|
||||||
- unp
|
- unp
|
||||||
|
|
||||||
- name: Create swap file
|
- name: Create swap file
|
||||||
command: |
|
command: dd if=/dev/zero of={{ swapfile_path }} bs=1M count={{ swapfile_size }}
|
||||||
{% if swapfile_fallocate %}
|
|
||||||
fallocate -l {{ ((swapfile_size) | int * 1024 * 1024) }} {{ swapfile_path }}
|
|
||||||
{% else %}
|
|
||||||
dd if=/dev/zero of={{ swapfile_path }} bs=1M count={{ swapfile_size }}
|
|
||||||
{% endif %}
|
|
||||||
args:
|
args:
|
||||||
creates: "{{ swapfile_path }}"
|
creates: "{{ swapfile_path }}"
|
||||||
register: swapfile_register_create
|
register: swapfile_register_create
|
||||||
|
|
Loading…
Reference in a new issue