Hi, Ansible newbie here.
When I try to run the last step of the remote server setup I get a Persmission denied error. I normally SSH into Webfaction with ssh baardbaard@baardbaard.webfactional.com.
If I’m understanding this correctly, Trellis tries to login with web@baardbaard.webfactional.com or root@baardbaard.webfactional.com. Both of these will not work. Is there anywhere where I can change the user that Trellis uses to login?
Thanks.
I’m not familiar with Webfaction or what customizations to trellis may be needed.
Provisioning. Trellis has the server.yml
playbook for provisioning. This sets up all the php, nginx, web root directory, etc., so the server is ready for a WordPress install. Perhaps Webfaction does all this for you so you won’t be running this playbook. If you do need to provision the server with this playbook, you can set remote_user: baardbaard
in server.yml
.
deploy.yml
must connect as web root owner. The server.yml
playbook makes the web root owned by whatever user is named in the web_user
variable. For the deploy.yml
playbook to be able to deploy/install WordPress in web root, it must connect as the owner of web root, so it connects as remote_user: “{{ web_user }}”.
If you can use both server.yml
and deploy.yml
. If Webfaction only allows you to connect as the user baardbaard
, you could set web_user: baardbaard
in group_vars/all
so that the deploy.yml
playbook can connect. If you’ve run server.yml
after setting web_user: baardbaard
, web root will be owned by baardbaard
and deploy.yml
will be able to make its changes.
If you can only use deploy.yml
. I’m not familiar with Webfaction, but I suspect it has a “one-click installer” you’ll be using instead of the server.yml
playbook. If it sets your web root owner to baardbaard
maybe you’ll still be able to run deploy.yml
as remote_user: baardbaard
.
However, if Webfaction sets the web root owner to some other user, you’ll need to be able to connect as that user for deploy.yml
to be able to connect and run. In this case, maybe Webfaction will let you add your public ssh key to this other user’s authorized_keys, enabling you to connect as that user (that would be a support question for Webfaction).
1 Like
I haven’t used Webfaction, but aren’t they shared hosting? Do they offer an unmanaged VPS? As stated here, it needs a new install of Ubuntu 14.04
Thank you both for your replies. I use Bedrock with Capistrano on Webfaction without any problems so I thought Trellis was just a step up. I wasn’t entirely sure how it worked and I must say that it isn’t obvious to me when I read the Github page that I need a new install of Ubuntu 14.04. Anyway, thank you for your help. Maybe I’ll get a Digital Ocean account to try it out.