Browse Source

fix swap file check

tags/2016.12
Lachlan Evenson 9 years ago
parent
commit
83c06ca0db
1 changed files with 1 additions and 2 deletions
  1. +1
    -2
      linux/storage/swap.sls

+ 1
- 2
linux/storage/swap.sls View File

linux_create_swap_partition_{{ swap.device }}: linux_create_swap_partition_{{ swap.device }}:
cmd.run: cmd.run:
- name: 'mkswap {{ swap.device }}' - name: 'mkswap {{ swap.device }}'
- onlyif: "test `file -L -s {{ swap.device }} | grep 'swap file' >/dev/null;echo $?` -ne 0"
- creates: {{ swap.device }}
- unless: file -L -s {{ swap.device }} | grep -q 'swap file'


linux_set_swap_partition_{{ swap.device }}: linux_set_swap_partition_{{ swap.device }}:
cmd.run: cmd.run:

Loading…
Cancel
Save