2022-05-30 15:46:36 +00:00
|
|
|
- name: Clone blog repository
|
|
|
|
git:
|
|
|
|
repo: "https://github.com/CPunch/openpunk.git"
|
|
|
|
dest: "/var/www/{{ domain }}"
|
|
|
|
|
2022-05-31 00:32:24 +00:00
|
|
|
- name: Setup git config
|
|
|
|
copy:
|
|
|
|
src: templates/.gitconfig
|
|
|
|
dest: /root/.gitconfig
|
|
|
|
owner: root
|
|
|
|
mode: u=rw,g=,o=
|
|
|
|
|
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:
|
|
|
|
src: templates/blog/updateBlog
|
|
|
|
dest: /usr/local/bin/updateBlog
|
|
|
|
mode: u+rwx
|
|
|
|
|
|
|
|
- name: Setup blog cron job
|
|
|
|
cron:
|
|
|
|
name: Build blog every hour
|
|
|
|
minute: 0
|
|
|
|
job: /usr/local/bin/updateBlog
|