shared gitea checkouts

This commit is contained in:
mark committed 2026-10-07 18:23:28 +02:00
1 parent fffc009ab9
commit 26449924b8
6 files changed
+79 -34

No files matched your search

+11 -18
View File
@@ -1,31 +1,19 @@
# Pulling needs to have git access; root does not.
- name: Include stroopwafel vault
include_vars:
dir: stroopwafel
files_matching: vault.yml
- name: Create stroopwafel directory
file:
path: "{{ stroopwafel_dir }}"
state: directory
owner: root
group: "{{ service_group | default('aurbis') }}"
mode: "0775"
- name: Check out stroopwafel source
ansible.builtin.git:
repo: "{{ stroopwafel_repo }}"
dest: "{{ stroopwafel_dir }}"
version: "{{ stroopwafel_version }}"
update: "{{ stroopwafel_update | default(false) }}"
accept_hostkey: true
force: false
become_user: "{{ stroopwafel_git_user | default(omit) }}"
- import_tasks: gitea_checkout.yml
vars:
checkout_repo: "{{ stroopwafel_repo }}"
checkout_dest: "{{ stroopwafel_dir }}"
checkout_version: "{{ stroopwafel_version }}"
- name: Deploy stroopwafel .env
copy:
content: "{{ stroopwafel_env_b64 | b64decode }}"
dest: "{{ stroopwafel_dir }}/.env"
owner: root
group: "{{ service_group | default('aurbis') }}"
mode: "0640"
mode: "0660"
when: stroopwafel_env_b64 is defined
no_log: true
- name: Copy docker-compose file
@@ -39,3 +27,8 @@
community.docker.docker_compose_v2:
project_src: "{{ stroopwafel_dir }}"
build: policy
- name: Restart stroopwafel on new code
community.docker.docker_compose_v2:
project_src: "{{ stroopwafel_dir }}"
state: restarted
when: checkout_pull is changed