Modify Lets Encrypt example to work correctly for non-root users.

This commit is contained in:
Jeff Geerling
2019-08-14 15:08:35 -05:00
parent 6a8fb24310
commit 3430ece1aa
2 changed files with 11 additions and 2 deletions
+8
View File
@@ -29,6 +29,14 @@ Run the Ansible playbook to automatically generate a Let's Encrypt certificate a
ansible-playbook -i inventory main.yml
### 5 - Verify the certificate works
After the playbook completes, visit your site at the https URL and verify it works with a valid certificate: `https://domain.example.com/`
Or use openssl on the command line to verify the certificate details:
openssl s_client -showcerts -connect domain.example.com:443
## About the Author
This project was created by [Jeff Geerling](https://www.jeffgeerling.com/) as an example for [Ansible for DevOps](https://www.ansiblefordevops.com/).
+3 -2
View File
@@ -1,6 +1,7 @@
---
- hosts: all
gather_facts: no
gather_facts: false
become: true
vars_files:
- vars/main.yml
@@ -8,7 +9,7 @@
pre_tasks:
- name: Install Python if not already present.
raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal)
changed_when: False
changed_when: false
- name: Gather facts after Python is definitely present.
setup: