fallocate doesn't work on NFS.
This commit is contained in:
parent
f7d02fdd20
commit
f8dff4d0b2
|
@ -7,7 +7,7 @@
|
||||||
- name: |
|
- name: |
|
||||||
swapon --show=NAME --noheadings | grep -q "^{{ path }}$" && swapoff {{ path }}
|
swapon --show=NAME --noheadings | grep -q "^{{ path }}$" && swapoff {{ path }}
|
||||||
rm -f {{ path }}
|
rm -f {{ path }}
|
||||||
fallocate -l {{ size }}M {{ path }}
|
dd if=/dev/zero of={{ path }} bs=1M count={{ size }}
|
||||||
chmod 0600 {{ path }}
|
chmod 0600 {{ path }}
|
||||||
mkswap {{ path }}
|
mkswap {{ path }}
|
||||||
- unless: bash -c '[[ $(($(stat -c %s {{ path }}) / 1024**2)) = {{ size }} ]]'
|
- unless: bash -c '[[ $(($(stat -c %s {{ path }}) / 1024**2)) = {{ size }} ]]'
|
||||||
|
|
Loading…
Reference in New Issue