2
0
mirror of https://github.com/schnidrig/openhab-ansible synced 2026-01-12 00:48:46 +01:00

openhab 2.5 on raspi4

This commit is contained in:
Christian Schnidrig
2020-01-01 20:34:53 +01:00
parent caf4dcd77a
commit 0c652dfbd2
30 changed files with 203 additions and 185 deletions

View File

@@ -1,29 +1,24 @@
---
- name: download certbot
get_url:
url: https://dl.eff.org/certbot-auto
dest: /root/certbot-auto
mode: 0540
tags:
- letsencrypt
- name: ensure packages are installed
apt:
pkg:
- certbot
- python-certbot-nginx
- python3-certbot-nginx
update_cache: "{{apt_config.update_cache}}"
cache_valid_time: "{{apt_config.cache_valid_time}}"
- name: get certificate
#shell: '/root/certbot-auto -n run --test-cert --nginx --agree-tos --email {{letsencrypt_email}} --cert-path /etc/nginx/ssl/cert.pem --key-path /etc/nginx/ssl/cert.key --fullchain-path /etc/nginx/ssl/chain.pem -d {{fqdn}}'
shell: '/root/certbot-auto -n run --nginx --agree-tos --email {{letsencrypt_email}} -d {{fqdn}}'
tags:
- letsencrypt
shell: 'certbot -n run --nginx --agree-tos --email {{letsencrypt_email}} -d {{fqdn}}'
- name: cron job
cron:
name: "get new certificate"
minute: "0"
hour: "5"
day: "11"
job: '/root/certbot-auto -n certonly --nginx --agree-tos --email {{letsencrypt_email}} -d {{fqdn}}'
cron_file: letsencrypt
user: root
tags:
- letsencrypt
- letsencrypt_cron
# - name: cron job
# cron:
# name: "get new certificate"
# minute: "0"
# hour: "5"
# day: "11"
# job: 'certbot -n certonly --nginx --agree-tos --email {{letsencrypt_email}} -d {{fqdn}}'
# cron_file: letsencrypt
# user: root