From 352c94c173fc176828a2e50d841c8e081fa0300a Mon Sep 17 00:00:00 2001
From: anima
Date: Wed, 4 Mar 2026 19:32:57 +0100
Subject: [PATCH] add tag handling
---
tasks/config.yml | 6 ++++++
tasks/install.yml | 5 +++++
2 files changed, 11 insertions(+)
diff --git a/tasks/config.yml b/tasks/config.yml
index 1d394ab..29bd71b 100644
--- a/tasks/config.yml
+++ b/tasks/config.yml
@@ -4,12 +4,14 @@
# https://docs.ansible.com/projects/ansible/latest/collections/ansible/builtin/command_module.html
---
- name: delete .runner file for redeploy
+ tags: [install, config]
ansible.builtin.file:
state: absent
path: "{{ RUNNER_DIR }}/.runner"
when: RUNNER_REDEPLOY
- name: register runner
+ tags: [install, config]
notify: restart runner
ansible.builtin.command:
cmd: "{{ RUNNER_DIR }}/{{ RUNNER_NAME }} register --no-interactive --instance {{ RUNNER_INSTANCE }} --token {{ RUNNER_TOKEN }}"
@@ -19,6 +21,7 @@
- RUNNER_TOKEN != None
- name: ensure correct access rights for .runner file
+ tags: [install, config]
ansible.builtin.file:
path: "{{ RUNNER_DIR }}/.runner"
owner: "{{ RUNNER_USER }}"
@@ -26,18 +29,21 @@
mode: '0660'
- name: enable runner
+ tags: [install, config]
notify: restart runner
ansible.builtin.service:
name: "{{ RUNNER_SERVICE_NAME }}"
enabled: yes
- name: create scripts dir
+ tags: [install, config]
ansible.builtin.file:
path: "{{ RUNNER_SCRIPT_DIR }}"
state: directory
mode: '0755'
- name: create default scripts
+ tags: [install, config]
ansible.builtin.copy:
dest: "{{ RUNNER_SCRIPT_DIR }}/{{ item.name }}"
content: "{{ item.content }}"
diff --git a/tasks/install.yml b/tasks/install.yml
index d62be23..231e29c 100644
--- a/tasks/install.yml
+++ b/tasks/install.yml
@@ -5,6 +5,7 @@
# https://docs.ansible.com/ansible/latest/collections/ansible/builtin/service_module.html
---
- name: create runner user
+ tags: [install]
ansible.builtin.user:
name: "{{ RUNNER_USER }}"
create_home: yes
@@ -13,6 +14,7 @@
home: "{{ RUNNER_DIR }}"
- name: download runner
+ tags: [install]
delegate_to: localhost
run_once: true
ansible.builtin.get_url:
@@ -21,6 +23,7 @@
mode: '0440'
- name: copy runner binary
+ tags: [install]
copy:
src: "{{ RUNNER_DOWNLOAD_DIR }}/{{ RUNNER_NAME }}"
dest: "{{ RUNNER_DIR }}/{{ RUNNER_NAME }}"
@@ -29,6 +32,7 @@
mode: '0770'
- name: create runner config
+ tags: [install]
ansible.builtin.template:
src: config.yml.j2
dest: "{{ RUNNER_DIR }}/config.yml"
@@ -37,6 +41,7 @@
mode: '0660'
- name: create runner service file
+ tags: [install]
notify: reload daemons
ansible.builtin.template:
src: runner.service.j2