add tag handling

This commit is contained in:
2026-03-04 19:32:57 +01:00
parent 6ebeaf01dd
commit 352c94c173
2 changed files with 11 additions and 0 deletions

View File

@@ -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 }}"