Introduction to Ansible Transcripts
Chapter: Deployments
Lecture: Testing the Nginx Tasks

Login or purchase this course to watch this video and the rest of the course contents.
0:00 Let's kick off our playbook
0:01 see how it works
0:02 see what we need to fix up.
0:09 Okay, so the error here is that certbot
0:11 which is what we used work with Let's Encrypt
0:13 needs to run in non-interactive mode.
0:19 Let's add this to our command.
0:26 All right, we got past the first error.
0:28 Open up our file.
0:33 Now, we could use the Nginx plug-in
0:35 but I'd rather just get past this error
0:37 so we can just stop Nginx temporarily.
1:02 Then we'll restart service
1:12 when we obtain the certificate
1:31 Generating the pem file may take a little while
1:33 so be patient on this step.
1:37 Okay, it looks like we got past the previous error message
1:39 but now we're having a problem having Nginx restarted
1:42 so open up the templates file
1:51 and both of those lines need to have semicolons at the end.
1:55 One more time.
2:11 And one more thing that we need to change.
2:12 Nginx is actually not started yet.
2:15 Nginx will not restart
2:18 due to that conditional we put in place
2:20 because we already have the Nginx files
2:22 and directory created.
2:27 We should make sure that we remove the "when" conditional here
2:30 because if Nginx is not running
2:31 this will make sure that it's started.
2:32 If it's already running, nothing will happen here.
2:41 Alright, so we were able to execute everything.
2:43 Now, our server is not yet up and running
2:45 because it's waiting on an upstream host
2:47 which is our werkzeug server that we're going to be running
2:49 but now we can grab our application
2:51 and we should be able to use the HTTPS connection
2:54 as reverse proxy for our werkzeug server
2:56 so let's keep going, grab our source code
2:59 and get our werkzeug server up and running.