From 917bf2e10026393e870aaf7b8eb4de3500037d19 Mon Sep 17 00:00:00 2001 From: anima Date: Wed, 4 Mar 2026 19:16:20 +0100 Subject: [PATCH] add scripts --- defaults/main.yml | 8 +++++++- tasks/config.yml | 11 ++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 5d155b7..e0c2e1d 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -12,4 +12,10 @@ RUNNER_SERVICE_NAME: "{{ RUNNER_NAME }}.service" RUNNER_DOWNLOAD_DIR: /tmp RUNNER_LABELS: - REPLACE_ME -RUNNER_REDEPLOY: false \ No newline at end of file +RUNNER_REDEPLOY: false +RUNNER_SCRIPT_DIR: "{{ RUNNER_DIR }}/scripts" +RUNNER_DEFAULT_SCRIPTS: + - name: askpass_helper.sh + content: | + #!/bin/bash + echo $GIT_TOKEN \ No newline at end of file diff --git a/tasks/config.yml b/tasks/config.yml index 794b273..37410f7 100644 --- a/tasks/config.yml +++ b/tasks/config.yml @@ -27,4 +27,13 @@ notify: restart runner ansible.builtin.service: name: "{{ RUNNER_SERVICE_NAME }}" - enabled: yes \ No newline at end of file + enabled: yes + +- name: create default scripts + ansible.builtin.copy: + dest: "{{ RUNNER_SCRIPT_DIR }}/{{ item.name }}" + content: "{{ item.content }}" + owner: "{{ RUNNER_USER }}" + group: "{{ RUNNER_GROUP }}" + mode: '0760' + loop: "{{ RUNNER_DEFAULT_SCRIPTS }}" \ No newline at end of file