Commit f91438a9 by Martin Fitzpatrick Committed by Fred Smith

Use templating to generate ssl-certs.conf in known location

Generates ssl-certs.conf in /opt (alongside certbot)
via template so location is known for copying to nginx
config in the run_certbot.sh script.
parent e3359162
...@@ -91,6 +91,14 @@ ...@@ -91,6 +91,14 @@
- install - install
- update - update
- name: render nginx cert configuration file
template:
src: ssl-certs.conf.j2
dest: /opt/ssl-certs.conf
owner: root
tags:
- install
- name: run certbot - name: run certbot
command: /opt/run_certbot.sh command: /opt/run_certbot.sh
tags: tags:
......
...@@ -28,7 +28,7 @@ ln -sf /etc/letsencrypt/live/{{ LETS_ENCRYPT_DOMAINS|first }}/privkey.pem /etc/s ...@@ -28,7 +28,7 @@ ln -sf /etc/letsencrypt/live/{{ LETS_ENCRYPT_DOMAINS|first }}/privkey.pem /etc/s
echo "Writing nginx certificate configuration..." echo "Writing nginx certificate configuration..."
# Copy the configuration file (with the above certs) into place # Copy the configuration file (with the above certs) into place
cp /edx/app/edxapp/configuration/playbooks/roles/lets_encrypt/templates/ssl-certs.conf /etc/nginx/ssl-certs.conf cp /opt/ssl-certs.conf /etc/nginx/ssl-certs.conf
# Stop nginx again if it wasn't running, or restart it if it was # Stop nginx again if it wasn't running, or restart it if it was
if [ "$nginxstate" == "stopped" ]; then if [ "$nginxstate" == "stopped" ]; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment