---
- name: make swap
  become: true
  shell: "fallocate -l 1G /swapfile || dd if=/dev/zero of=/swapfile bs=1M count=1024 ; chmod 600 /swapfile ; mkswap /swapfile ; /sbin/swapon /swapfile"
  args:
    creates: /swapfile
- name: swap fstab
  become: true
  lineinfile:
    path: /etc/fstab
    line: '/swapfile none swap defaults 0 0'
    insertafter: 'EOF'
