Trellis Ansible Playbook setup: Swapon failed


Getting this doing ansible-playbook setup for a remote server:

swapon: /swapfile: swapon failed: Operation not permitted

Running on Ubuntu 14 LTS on a VPS (OpenVZ)

If I had to guess it’s probably a restriction from your VPS provider. They may not let users create swap files.

You can just remove the role from running:

Ah, thanks. Is is something else i have to think about when doing this?

Well a swapfile is useful when your server runs out of physical memory. You could contact your VPS provider and ask them if 1) a swapfile already exists, or 2) if they could create one for you.

I have the same problem on my Elastic Host container… The thing is that EH recommend not using swap files and scale up available memory ressources if needed. Swap files can get really slow on that type of service.