Use this ansible playbook to setup a fresh server with the following components:
- Nginx
- Nginx Config for WP Super Cache
- Certbot (Let's Encrypt)
- MySQL
- Memcached
- PHP
- Directories to deploy multiple Wordpress sites
- Swapfile (useful for small DO instances)
- Locales
- Postfix
- SSH access via authorized_keys file
- Tools (tmux, vim, htop, git, wget, curl etc.)
- Rename
hosts.example
tohosts
and modify the contents. - Rename
group_vars/all.example
togroup_vars/all
and modify the contentes.
There are a bunch of things you can set in group_vars/all
. Don't forget to add your host address to hosts
.
Run ansible-playbook site.yml -i hosts
.