Appending to etc/hosts file on remote

Not sure the exact cause of my issue, other than it might have something to do with either Ubuntu 18.04 or Cloudflare, but to fix it, I simply need to append the following to my remote etc/hosts file for certain Wordpress plugins to work properly:

127.0.0.1 mysite.org
127.0.0.1 staging.mysite.org
127.0.0.1 staging2.mysite.org

… and so on. Any advice on the best way to do this during provision or deployment?

You could use https://github.com/holms/ansible-fqdn

This topic was automatically closed after 42 days. New replies are no longer allowed.