2022-05-31 04:36:55 +00:00
|
|
|
---
|
2022-05-30 15:46:36 +00:00
|
|
|
- name: Clone blog repository
|
|
|
|
git:
|
|
|
|
repo: "https://github.com/CPunch/openpunk.git"
|
|
|
|
dest: "/var/www/{{ domain }}"
|
|
|
|
|
2023-01-14 23:26:17 +00:00
|
|
|
# TODO: make idempotent
|
2022-05-30 15:46:36 +00:00
|
|
|
- name: Build blog
|
|
|
|
command:
|
|
|
|
cmd: hugo
|
|
|
|
chdir: "/var/www/{{ domain }}"
|
|
|
|
|
2022-05-31 00:32:24 +00:00
|
|
|
- name: Install updateBlog script
|
|
|
|
template:
|
2023-01-14 23:26:17 +00:00
|
|
|
src: templates/updateBlog
|
2022-05-31 00:32:24 +00:00
|
|
|
dest: /usr/local/bin/updateBlog
|
2022-10-04 16:29:40 +00:00
|
|
|
mode: u+rx
|
2022-05-31 00:32:24 +00:00
|
|
|
|
2022-08-02 18:32:19 +00:00
|
|
|
# Rebuild blog every hour
|
2022-05-31 00:32:24 +00:00
|
|
|
- name: Setup blog cron job
|
|
|
|
cron:
|
|
|
|
name: Build blog every hour
|
|
|
|
minute: 0
|
|
|
|
job: /usr/local/bin/updateBlog
|