A full tutorial article can be found at: Sécuriser son serveur avec Ansible
You need to install ansible on your computer : you can find documentation here
Change the user/port/ip-address variables in ./production file to suit your needs.
ansible-playbook site.yml -i production --ask-sudo --ask-pass