Add letsrenew role

This commit is contained in:
Alexander Dietrich 2017-10-03 16:05:22 +02:00
commit cee2fde3ac
6 changed files with 87 additions and 6 deletions

View file

@ -0,0 +1,40 @@
---
- name: create /opt/certbot
file:
path: /opt/certbot
mode: 0750
state: directory
- name: download certbot
get_url:
url: https://raw.githubusercontent.com/certbot/certbot/master/certbot-auto
dest: /opt/certbot/certbot-auto
mode: 0550
- name: create webroot path
file:
path: "{{ letsrenew_webroot }}"
state: directory
- name: create /etc/letsencrypt
file:
path: /etc/letsencrypt
state: directory
- name: template cli.ini
template:
src: cli.ini.j2
dest: /etc/letsencrypt/cli.ini
- name: clone letsrenew
git:
repo: https://github.com/7adietri/letsrenew.git
dest: /opt/letsrenew
- name: create cronjob
cron:
name: "Let's Encrypt certificate renewal"
job: "/opt/letsrenew/letsrenew {{ letsrenew_email }} /opt/certbot/certbot-auto"
minute: 0
hour: 6
weekday: 1