ERROR! the role 'swapfile' was not found


#1

I just grabbed the latest Trellis from the repo. Deployed successfully but now getting the above error!


#2

The reason was that I had provisioned the server, then updated the version of Trellis, replacing all but the group_vars, hosts and .vault_pass.

Then hadn’t run ansible-galaxy install -r requirements.yml to replace what I had moved to a backup location.


#3

Then I had to grant sudo NOPASSWD to , admin use as it seems the the original provisioning disabled that for the root user, which I think can be (unwisely) disabled in the Trellis config.

Followed this answer for quick easy approach (as opposed to using /etc/sudoers.d file):


#4

I getting the same error with a fresh clone of the repo. It appears the role ‘swapfile’ does not exist. Does this get generated somehow? I’m trying to do a remote setup following the trellis instructions on that subject.


#5

Run the following command in your Trellis directory:

ansible-galaxy install -r requirements.yml

#6

Oops i see it in the docs now … https://roots.io/trellis/docs/remote-server-setup/

Thanks for the help!


#7

I am experiencing the same error today. When running ansible-galaxy install -r requirements.yml I get:

[WARNING]: - swapfile was NOT installed successfully: - sorry, tersmitten.swapfile was not found on https://galaxy.ansible.com.

Has swapfile been removed from Ansilble Galaxy?

https://galaxy.ansible.com/tersmitten/swapfile


#8

I’ve encountered exactly the same problem and it does look like the repository has been removed.

Is there any solution to this? Another role which would fulfil the requirements here perhaps?


#9

Managed to make things work with Oefenweb.swapfile v2.0.7.

Ref:




#10

With Oefenweb.swapfile it works, thanks!

In trellis/requirements.yml:

- name: swapfile 
  src: oefenweb.swapfile 
  version: v2.0.7

In trellis/server.yml:

- { role: swapfile, swapfile_size: 1GB, tags: [swapfile] }

#11

@silumesii @flocca You are both amazing as I am very dumb, new to trellis and would have never figured this out! Thank you :pray:t3: