openpunk-ansible/roles/blog/tasks/main.yml
CPunch abaa4c9639 switched to roles
- all tasks/* have been moved to their own roles in roles/*
- each file && template is now oragnized per-role
- annotated each task which still isn't idempotent !TODO!
2023-01-14 17:26:17 -06:00

24 lines
501 B
YAML

---
- name: Clone blog repository
git:
repo: "https://github.com/CPunch/openpunk.git"
dest: "/var/www/{{ domain }}"
# TODO: make idempotent
- name: Build blog
command:
cmd: hugo
chdir: "/var/www/{{ domain }}"
- name: Install updateBlog script
template:
src: templates/updateBlog
dest: /usr/local/bin/updateBlog
mode: u+rx
# Rebuild blog every hour
- name: Setup blog cron job
cron:
name: Build blog every hour
minute: 0
job: /usr/local/bin/updateBlog