Skip to content

greyphin/ansible-letsencrypt-nginx

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deploy Let's Encrypt Cert to NGINX

This repository contains Ansible playbooks that will generate a Let's Encrypt SSL certificate on your local machine and deploy it along with a static website to an NGINX web server.

Requirements

  • Ansible v2.9.11+ installed on local machine (Has been tested on a Mac)
  • Ubuntu 18.04 (Target Machine)
  • The playbook requires Cloudflare DNS (Used to validate SSL cert)

Using

  1. First add your Cloudflare email, API Token and Zone to a file located at ~/.secrets/cloudflare using the following example:
export CF_EMAIL=<youremail>
export CF_API_TOKEN=<yourtoken>
export CF_ZONE=<yourdomain>
  1. Modify the domain variable in the vars.yml file and add any subdomains that should belong in the certificate.

  2. Copy your static website into the site or change the path in the vars.yml.

  3. Assign the hosts and user by modifying the inventory.yml file.

  4. Copy your SSH public key to the target machine then run the following:

./deploy

License

MIT License

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 80.6%
  • Shell 19.4%