openpunk-ansible/roles/blog/tasks/main.yml

24 lines
517 B
YAML
Raw Normal View History

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 }}"
- name: Install updateBlog script
template:
src: templates/updateBlog
dest: /usr/local/bin/updateBlog
2022-10-04 16:29:40 +00:00
mode: u+rx
- name: Build blog
command:
cmd: updateBlog
register: blog_out
changed_when: blog_out.stdout != "up to date"
2022-08-02 18:32:19 +00:00
# Rebuild blog every hour
- name: Setup blog cron job
cron:
name: Build blog every hour
minute: 0
job: /usr/local/bin/updateBlog