# Creating a swap file on a new partition using Ansible

**URL:** <https://forum.ansible.com/t/creating-a-swap-file-on-a-new-partition-using-ansible/22114>\
**Category:** Ansible Project\
**Tags:** aws\
**Created:** [July 25, 2016, 5:47pm UTC](https://forum.ansible.com/t/creating-a-swap-file-on-a-new-partition-using-ansible/22114 "2016-07-25T17:47:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![karthik\_keyan](https://avatars.discourse-cdn.com/v4/letter/k/779978/32.png) [@karthik\_keyan](https://forum.ansible.com/u/karthik_keyan)\
**Post date:** [July 25, 2016, 5:47pm UTC](https://forum.ansible.com/t/creating-a-swap-file-on-a-new-partition-using-ansible/22114/1 "2016-07-25T17:47:16Z")

</div>

We are running a project to automate server build on our AWS infrastructure. On a AWS instance, I need to create a swap space as that of memory size of the instance. Any suggestions to use existing modules or I need to write a playbook of my own ?

Thanks & Regards,  
Karthik
