Clone this repo to your local machine with submodules:
git clone https://github.com/lysenkooo/ansible-debian.git
Just run:
make vagrant
If you want to use your custom playbook (eg. playbook.local.yml) then run:
PLAYBOOK=local make vagrant
Run on the remote machine:
# useradd -m -s /bin/bash deploy
# passwd deploy
# apt-get update
# apt-get upgrade
# apt-get install sudo
# echo 'deploy ALL=(ALL:ALL) NOPASSWD: ALL' > /etc/sudoers.d/deploy
Then on local machine:
$ ssh-copy-id deploy@hostname
$ make provision
To generate ssl certificate on host:
sudo certbot certonly --webroot -w /var/www/app/current/public -d example.com