mirror of
https://github.com/CPunch/openpunk-ansible.git
synced 2025-11-07 16:10:07 +00:00
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:
24
roles/blog/tasks/main.yml
Normal file
24
roles/blog/tasks/main.yml
Normal 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
|
||||
Reference in New Issue
Block a user