Ansible で Swap 追加済みの AMI を作成する

 - name: dd if=/dev/zero of=/swapfile bs=1M count=1024
   shell: dd if=/dev/zero of=/swapfile bs=1M count=1024

 - name: mkswap /swapfile
   shell: mkswap /swapfile

 - name: chmod 0600 /swapfile
   shell: chmod 0600 /swapfile

 - name: echo "/swapfile none swap sw 0 0" >> /etc/fstab
   shell: echo "/swapfile none swap sw 0 0" >> /etc/fstab