Skip to content

Instantly share code, notes, and snippets.

@quicksnap
Created December 19, 2013 21:48
Show Gist options
  • Select an option

  • Save quicksnap/8046801 to your computer and use it in GitHub Desktop.

Select an option

Save quicksnap/8046801 to your computer and use it in GitHub Desktop.
- name: check swapfile existence
file: path=/swapfile state=file
ignore_errors: True
register: swap_test
tags: swap
# Creates a 512MB Swapfile
- name: create swapfile
command: dd if=/dev/zero of=/swapfile bs=1024 count=512k
when: swap_test|failed
tags: swap
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment