I use these playbooks for managing my web server and home servers.
Prepares host for further management with ansible. The pllaybook creates a user called ansible, adds it to the sudoers file with no password required, and inserts SSH key for the user.
Generate SSL certs with Let's Encrypt as provider and Linode as DNS registrar.
credentials
:
- path to credentials file with Linode token giving DNS write access.
- default value:
"../linode-credentials.ini"
cert_groups
:
- host groups, as defined in hosts inventory file.
- for every host in these groups, two variables must be defined:
ssl_domains
, a set of domains its SSL certificate will be valid for, comma separated. E.g.:example.com,www.example.com,blog.example.com
.ssl_main_domain
, being the domain Certbot uses as the directory name where the certificate is stored. Usually it is the first of the domains inssl_domains
, in the example above:example.com
.
- default value:
- web
- vpn_servers