swap
This commit is contained in:
parent
350e59322c
commit
54b8cb884d
1 changed files with 1 additions and 6 deletions
|
@ -18,12 +18,7 @@
|
|||
- unp
|
||||
|
||||
- name: Create swap file
|
||||
command: |
|
||||
{% 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 %}
|
||||
command: dd if=/dev/zero of={{ swapfile_path }} bs=1M count={{ swapfile_size }}
|
||||
args:
|
||||
creates: "{{ swapfile_path }}"
|
||||
register: swapfile_register_create
|
||||
|
|
Loading…
Reference in a new issue