Skip to content
Snippets Groups Projects
Commit eef02ea9 authored by Lars Beckers's avatar Lars Beckers
Browse files

static-website: add self-updater cron

parent 18a82c72
No related branches found
No related tags found
No related merge requests found
......@@ -7,3 +7,4 @@ static_websites: []
# git_version: HEAD
# deploy_key: "{{ inventory_dir }}/files/deploy-keys/website"
# deploy_key_name: website
# cron_interval: '@daily' # only without deploy_key!
......@@ -38,3 +38,10 @@
tags:
- static-website
- name: ensure we have self-updating websites
template:
src: cronjob.j2
dest: /etc/cron.d/static-websites
mode: '0644'
tags:
- static-website
{% for website in static_websites %}
{% if website.cron_interval|default('@daily') is not none and website.deploy_key is undefined %}
{{ website.cron_interval|default('@daily') }} root git -C {{ website.path }} pull --ff-only --quiet
{% endif %}
{% endfor %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment