Hello Friends,
I’m new to using Trellis, in the process I learn somewhat about ansible (task Automation) and vagrant boxes, Using couple of tutorials (mentioned below), I tried to setup a trellis based application on my digital ocean server.
Tutorial links:
System:
My PC: Ubuntu 16.04
Digital Ocean Server: ubuntu 16.04.2
Ansible: 2.3.0.0
vagrant : 1.9.4
Based on the tutorial I successfully installed the trellis and the development version works fine on my local system.
Now, I tried to deploy it to digital ocean via one of the gitlab repo hosted on my client’s server. I changed the values into the wordpress_sites.yml and vault.yml (for production) and changed the relevant data into the users.yml file as well.
when I run “ansible-playbook server.yml -e env=production” it works fine. After that when I run “./bin/deploy.sh production <mydomain.com>” then It gives me the error of SSH, unreachable.
PLAY [Deploy WP site] **************************************************************************************************************************************************
TASK [Gathering Facts] *************************************************************************************************************************************************
System info:
Ansible 2.3.0.0; Linux
Trellis at "Add Vagrant config"
---------------------------------------------------
SSH Error: data could not be sent to remote host "<serverip>". Make sure
this host can be reached over ssh
fatal: <serverip>: UNREACHABLE! => {"changed": false, "unreachable": true}
to retry, use: --limit @<projectroot>/trellis/deploy.retry
PLAY RECAP *************************************************************************************************************************************************************
<serverip> : ok=2 changed=0 unreachable=1 failed=0
localhost : ok=0 changed=0 unreachable=0 failed=0
I did the following tries.
- connect Digitalocean server via ssh from my local - connected
- ssh into vagrant, then connect to digitalocean server via ssh - connected
- ssh into digitalocean and tried to clone gitlab repo from digitalocean server, It connects via https link with password, but gives permission denied (publickey) error, when tried simple clone via ssh.
I guess this is something related to gitlab repo and digital ocean, but I can’t figure out what. Can you guys please help/guide me.
Thanks,
Dilip Gupta