ansible-config/roles/letsrenew/tasks/main.yml
Alexander Dietrich cee2fde3ac Add letsrenew role
2017-10-03 16:05:22 +02:00

41 lines
854 B
YAML

---
- 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