Skip to content

Instantly share code, notes, and snippets.

@sillygwailo
Last active March 14, 2016 20:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sillygwailo/5087350a0887a34b835a to your computer and use it in GitHub Desktop.
Save sillygwailo/5087350a0887a34b835a to your computer and use it in GitHub Desktop.
Ansible playblook to renew Let's Encrypt SSL
---
- hosts: YOUR_HOST_HERE
tasks:
- name: Stop Apache
service: name=httpd state=stopped
become: yes
become_user: root
- name: Renew Let's Encrypt certificate
command: ./letsencrypt-auto --agree-dev-preview --renew-by-default -t -d YOUR_DOMAIN_HERE -d YOUR_WWW_SUBDOMAIN_AND_DOMAIN_HERE --server https://acme-v01.api.letsencrypt.org/directory auth
args:
chdir: /root/letsencrypt
become: yes
become_user: root
- name: Start Apache
service: name=httpd state=started
become: yes
become_user: root
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment