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!
This commit is contained in:
2023-01-14 17:26:17 -06:00
parent d435ab80ac
commit abaa4c9639
23 changed files with 33 additions and 24 deletions

24
roles/blog/tasks/main.yml Normal file
View File

@@ -0,0 +1,24 @@
---
- 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