aboutsummaryrefslogtreecommitdiff
path: root/roles/git/tasks
diff options
context:
space:
mode:
authorJohannes Stoelp <johannes.stoelp@gmail.com>2022-12-30 15:01:12 +0100
committerJohannes Stoelp <johannes.stoelp@gmail.com>2022-12-30 15:01:12 +0100
commit543b1f369576430b76f0aa7d44c4fe6f7e9785b4 (patch)
tree6b84bbdfe49a73db7e9920255e8a1f0d6a516c06 /roles/git/tasks
parentad21e610481ae8b39a314dd5b9d6e16732b5943a (diff)
downloadansible-memzero-543b1f369576430b76f0aa7d44c4fe6f7e9785b4.tar.gz
ansible-memzero-543b1f369576430b76f0aa7d44c4fe6f7e9785b4.zip
git: add zola runner to automatically build & depoly the blog
Diffstat (limited to 'roles/git/tasks')
-rw-r--r--roles/git/tasks/main.yml23
1 files changed, 22 insertions, 1 deletions
diff --git a/roles/git/tasks/main.yml b/roles/git/tasks/main.yml
index 0557615..131b971 100644
--- a/roles/git/tasks/main.yml
+++ b/roles/git/tasks/main.yml
@@ -1,11 +1,14 @@
---
- name: Copy container build files
ansible.builtin.copy:
- src: gitolite-cgit
+ src: "{{ item }}"
dest: "{{ DATA_ROOT }}/git"
owner: "{{ USER }}"
group: "{{ USER }}"
mode: preserve
+ loop:
+ - gitolite-cgit
+ - runner-zola
- name: Build gitolite cgit image
containers.podman.podman_image:
@@ -38,3 +41,21 @@
jump: ACCEPT
comment: Accept gitolite SSH connections.
become: true
+
+- name: Build zola runner image
+ containers.podman.podman_image:
+ name: runner-zola
+ path: "{{ DATA_ROOT }}/git/runner-zola"
+ force: true
+ register: runner_zola_build
+
+- name: Start zola runner
+ containers.podman.podman_container:
+ name: runner-zola
+ image: runner-zola
+ network: "{{ NETWORK }}"
+ volumes:
+ # Mount the webserver webroot to deploy the blog.
+ # Use 'z' to shared-ly relable selinux contexts.
+ - "{{ DATA_ROOT }}/nginx/www:/www:z"
+ recreate: "{{ runner_zola_build.changed }}"