From c751e3c15bd564db23a81edd94512363a044c2bf Mon Sep 17 00:00:00 2001 From: benjilegeek Date: Fri, 3 Apr 2026 17:27:33 +0200 Subject: [PATCH] add blog redeployment playbook --- playbooks/reload_blog.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 playbooks/reload_blog.yml diff --git a/playbooks/reload_blog.yml b/playbooks/reload_blog.yml new file mode 100644 index 0000000..9ed08ef --- /dev/null +++ b/playbooks/reload_blog.yml @@ -0,0 +1,23 @@ +--- +- name: Deploy the fresh version of the blog + hosts: strato2 + become: yes + gather_facts: yes + + tasks: + - name: Pull blog repo via ssh + ansible.builtin.git: + repo: git@82.165.198.84:vashqlf/benji0x3c.git + dest: /root/benji0x3c + version: main + accept_hostkey: yes + become_user: root # run as a specific user with SSH key access + + - name: Run zola build + ansible.builtin.command: + cmd: zola build + chdir: /root/benji0x3c # directory containing config.toml + + - name: Rsync build on remote + ansible.builtin.command: + cmd: rsync -av /root/benji0x3c/public/ /var/www/public/