Hi everyone,
this is simple ansible-playbook for install and configuration basic settings webserver with HAproxy, PHP, NGINX and MariaDB.
Testing on Debian 8 Jessie.
First you must to state ours server in /etc/ansible/hosts on your local computer for example:
[webservers] sub.example.com 10.13.56.10
It is possible to use FQDN or IP adress remote server.
Since Ansible requires running under the root user, you need to upload the private ssh key to the root server into the authorized_keys file:
cat ~/.ssh/id_rsa.pub | ssh sub.example.com "mkdir -p /root/.ssh && cat >> /root/.ssh/authorized_keys"
Now clone repo with ansible, switch to directory ansible and let’s play:
ansible-playbook main.yml