Issue #83: More tweaks for Let's Encrypt example in chapter 12.

This commit is contained in:
Jeff Geerling
2019-08-15 16:40:10 -05:00
parent 3430ece1aa
commit 603b08dec1
4 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -13,8 +13,8 @@ This demonstrates generating valid TLS certificates using Let's Encrypt and Cert
1. Create a publicly-accessible VM running Ubuntu 18.04 (on your favorite cloud provider, like AWS, DigitalOcean, etc.).
2. Point a valid domain name at this server's IP address (e.g. using Route53 or your DNS provider).
3. Make sure your SSH key is added to the root user account.
4. Make sure you can SSH into the server using `ssh root@domain.example.com` (where `domain.example.com` is the domain name you have pointed at the server's IP address).
3. Make sure your SSH key is added to your user account, and your account has `sudo` access.
4. Make sure you can SSH into the server using `ssh myuser@subdomain.example.com` (where `subdomain.example.com` is the domain name you have pointed at the server's IP address).
### 3 - Configure the inventory
+1 -1
View File
@@ -1,2 +1,2 @@
[letsencrypt]
domain.example.com ansible_ssh_user=root [email protected]
subdomain.example.com ansible_ssh_user=myuser [email protected]
+2 -2
View File
@@ -1,5 +1,5 @@
---
- hosts: all
- hosts: letsencrypt
gather_facts: false
become: true
@@ -15,7 +15,7 @@
setup:
- name: Ensure apt cache is updated.
apt: update_cache=yes cache_valid_time=600
apt: update_cache=true cache_valid_time=600
roles:
- geerlingguy.firewall
+3 -3
View File
@@ -7,13 +7,13 @@ firewall_allowed_tcp_ports:
# Nginx settings.
nginx_vhosts: []
nginx_remove_default_vhost: True
nginx_ppa_use: True
nginx_remove_default_vhost: true
nginx_ppa_use: true
nginx_ppa_version: stable
nginx_docroot: /var/www/html
# Let's Encrypt certificate settings.
certbot_create_if_missing: yes
certbot_create_if_missing: true
certbot_admin_email: "{{ letsencrypt_email }}"
certbot_certs:
- domains: