Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
97e7687e25 | ||
|
|
f672da1753 | ||
|
|
d6549de2e0 | ||
|
|
dc4bb0936d | ||
|
|
52477e558a | ||
|
|
28214de583 |
+49
-6
@@ -256,15 +256,15 @@ jobs:
|
|||||||
echo "All molecule tests passed."
|
echo "All molecule tests passed."
|
||||||
|
|
||||||
auto-merge:
|
auto-merge:
|
||||||
# Auto-merge runs after validate + molecule-tests pass (or molecule is skipped).
|
# Auto-merge runs after validate passes. molecule-tests is NOT in needs
|
||||||
# Uses always() so it evaluates even when molecule-tests is skipped
|
# because Gitea Actions skips dependent jobs of skipped jobs without
|
||||||
# (Gitea Actions skips dependent jobs of skipped jobs by default).
|
# evaluating if: conditions — having molecule-tests in needs would
|
||||||
needs: [validate, molecule-tests]
|
# cascade the skip to auto-merge when ansible-changed=false.
|
||||||
|
needs: [validate]
|
||||||
if: >-
|
if: >-
|
||||||
always() &&
|
always() &&
|
||||||
github.event_name == 'pull_request' &&
|
github.event_name == 'pull_request' &&
|
||||||
needs.validate.result == 'success' &&
|
needs.validate.result == 'success'
|
||||||
(needs.molecule-tests.result == 'success' || needs.molecule-tests.result == 'skipped')
|
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
container: git.oblachno.oblachno.fyi/oblachno-oss/runner-images/ci-base:latest
|
container: git.oblachno.oblachno.fyi/oblachno-oss/runner-images/ci-base:latest
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
@@ -295,6 +295,49 @@ jobs:
|
|||||||
--checklist-confirmed \
|
--checklist-confirmed \
|
||||||
--checklist-categories 1,2,3,4,5,6,7,8,9,10,11,12,13 \
|
--checklist-categories 1,2,3,4,5,6,7,8,9,10,11,12,13 \
|
||||||
--body "Auto-approved: all CI checks passed (validate, molecule-tests)."
|
--body "Auto-approved: all CI checks passed (validate, molecule-tests)."
|
||||||
|
- name: Wait for molecule tests to complete
|
||||||
|
env:
|
||||||
|
CI_GITEA_API_TOKEN: ${{ secrets.CI_GITEA_API_TOKEN }}
|
||||||
|
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
|
||||||
|
run: |
|
||||||
|
. .venv/bin/activate 2>/dev/null || true
|
||||||
|
# Poll commit status until all required checks pass or fail
|
||||||
|
MAX_WAIT=600 # 10 minutes
|
||||||
|
ELAPSED=0
|
||||||
|
while [ $ELAPSED -lt $MAX_WAIT ]; do
|
||||||
|
STATUS=$(curl -s -H "Authorization: token $CI_GITEA_API_TOKEN" \
|
||||||
|
"https://git.oblachno.oblachno.fyi/api/v1/repos/${{ github.repository }}/commits/$HEAD_SHA/status" \
|
||||||
|
| python3 -c "
|
||||||
|
import sys,json
|
||||||
|
d=json.load(sys.stdin)
|
||||||
|
statuses={s['context']:s['status'] for s in d.get('statuses',[])}
|
||||||
|
# Check if all molecule-tests contexts are terminal (success/failure)
|
||||||
|
mol_contexts=[k for k in statuses if 'molecule-tests' in k]
|
||||||
|
if not mol_contexts:
|
||||||
|
print('pending')
|
||||||
|
elif all(statuses[k] in ('success','failure') for k in mol_contexts):
|
||||||
|
if any(statuses[k]=='failure' for k in mol_contexts):
|
||||||
|
print('failure')
|
||||||
|
else:
|
||||||
|
print('success')
|
||||||
|
else:
|
||||||
|
print('pending')
|
||||||
|
")
|
||||||
|
echo "Molecule tests status: $STATUS (elapsed: ${ELAPSED}s)"
|
||||||
|
if [ "$STATUS" = "success" ]; then
|
||||||
|
echo "All molecule tests passed."
|
||||||
|
break
|
||||||
|
elif [ "$STATUS" = "failure" ]; then
|
||||||
|
echo "ERROR: Molecule tests failed. Aborting auto-merge."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
sleep 30
|
||||||
|
ELAPSED=$((ELAPSED + 30))
|
||||||
|
done
|
||||||
|
if [ $ELAPSED -ge $MAX_WAIT ]; then
|
||||||
|
echo "ERROR: Timed out waiting for molecule tests."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
- name: Squash merge with task ID
|
- name: Squash merge with task ID
|
||||||
env:
|
env:
|
||||||
CI_GITEA_API_TOKEN: ${{ secrets.CI_GITEA_API_TOKEN }}
|
CI_GITEA_API_TOKEN: ${{ secrets.CI_GITEA_API_TOKEN }}
|
||||||
|
|||||||
@@ -96,3 +96,43 @@ repos:
|
|||||||
types: [python]
|
types: [python]
|
||||||
pass_filenames: false
|
pass_filenames: false
|
||||||
stages: [pre-push]
|
stages: [pre-push]
|
||||||
|
|
||||||
|
- id: check-ansible-no-log
|
||||||
|
name: ansible no_log on secret tasks
|
||||||
|
entry: make check-ansible-no-log
|
||||||
|
language: system
|
||||||
|
files: ^ansible/.*\.(yml|yaml)$
|
||||||
|
pass_filenames: false
|
||||||
|
stages: [pre-commit]
|
||||||
|
|
||||||
|
- id: check-ansible-no-state-absent-on-db
|
||||||
|
name: no state absent on DB paths
|
||||||
|
entry: make check-ansible-no-state-absent-on-db
|
||||||
|
language: system
|
||||||
|
files: ^ansible/.*\.(yml|yaml)$
|
||||||
|
pass_filenames: false
|
||||||
|
stages: [pre-commit]
|
||||||
|
|
||||||
|
- id: check-ansible-patterns
|
||||||
|
name: ansible failure-masking patterns
|
||||||
|
entry: make check-ansible-patterns
|
||||||
|
language: system
|
||||||
|
files: ^ansible/.*\.(yml|yaml)$
|
||||||
|
pass_filenames: false
|
||||||
|
stages: [pre-commit]
|
||||||
|
|
||||||
|
- id: check-jinja-expr
|
||||||
|
name: jinja2 expression validation
|
||||||
|
entry: make check-jinja-expr
|
||||||
|
language: system
|
||||||
|
files: ^ansible/.*\.(yml|yaml|j2)$
|
||||||
|
pass_filenames: false
|
||||||
|
stages: [pre-commit]
|
||||||
|
|
||||||
|
- id: check-ansible-set-fact-to-json
|
||||||
|
name: set_fact to_json misuse check
|
||||||
|
entry: make check-ansible-set-fact-to-json
|
||||||
|
language: system
|
||||||
|
files: ^ansible/.*\.(yml|yaml)$
|
||||||
|
pass_filenames: false
|
||||||
|
stages: [pre-commit]
|
||||||
|
|||||||
@@ -2,6 +2,18 @@
|
|||||||
|
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
|
## [0.21.1] - 2026-08-24
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
- Use runuser for systemctl --user tasks in gitea_runner role
|
||||||
|
|
||||||
|
## [0.21.0] - 2026-08-09
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
- *(healthcheck)* Add two-tier disk prune with critical threshold
|
||||||
|
|
||||||
## [0.20.0] - 2026-08-09
|
## [0.20.0] - 2026-08-09
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
|||||||
@@ -175,11 +175,36 @@ makefile-lint:
|
|||||||
echo "checkmake not found, skipping Makefile lint"; \
|
echo "checkmake not found, skipping Makefile lint"; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
lint-all: lint ansible-lint makefile-lint workflow-lint check-api-identity-checks
|
lint-all: lint ansible-lint makefile-lint workflow-lint check-api-identity-checks check-ansible-no-log check-ansible-no-state-absent-on-db check-ansible-patterns check-jinja-expr check-ansible-set-fact-to-json
|
||||||
|
|
||||||
check-api-identity-checks:
|
check-api-identity-checks:
|
||||||
@$(BIN)/python -m devx.tools.check_api_identity_checks
|
@$(BIN)/python -m devx.tools.check_api_identity_checks
|
||||||
|
|
||||||
|
check-ansible-no-log:
|
||||||
|
@echo "[check-ansible-no-log] Checking Ansible tasks for missing no_log on secret-handling tasks..."
|
||||||
|
@$(BIN)/python -m devx.tools.check_ansible_no_log
|
||||||
|
@echo "[check-ansible-no-log] Passed."
|
||||||
|
|
||||||
|
check-ansible-no-state-absent-on-db:
|
||||||
|
@echo "[check-ansible-no-state-absent-on-db] Checking for state: absent on DB data directories..."
|
||||||
|
@$(BIN)/python -m devx.tools.check_ansible_no_state_absent_on_db
|
||||||
|
@echo "[check-ansible-no-state-absent-on-db] Passed."
|
||||||
|
|
||||||
|
check-ansible-patterns:
|
||||||
|
@echo "[check-ansible-patterns] Checking for dangerous failure-masking patterns..."
|
||||||
|
@$(BIN)/python -m devx.tools.check_ansible_patterns
|
||||||
|
@echo "[check-ansible-patterns] Passed."
|
||||||
|
|
||||||
|
check-jinja-expr:
|
||||||
|
@echo "[check-jinja-expr] Validating Jinja2 expressions in Ansible files..."
|
||||||
|
@$(BIN)/python -m devx.tools.check_jinja_expr
|
||||||
|
@echo "[check-jinja-expr] Passed."
|
||||||
|
|
||||||
|
check-ansible-set-fact-to-json:
|
||||||
|
@echo "[check-ansible-set-fact-to-json] Checking set_fact tasks for to_json misuse..."
|
||||||
|
@$(BIN)/python -m devx.tools.check_ansible_set_fact_to_json
|
||||||
|
@echo "[check-ansible-set-fact-to-json] Passed."
|
||||||
|
|
||||||
test-integration:
|
test-integration:
|
||||||
$(BIN)/pytest tests/integration/ -v --no-cov
|
$(BIN)/pytest tests/integration/ -v --no-cov
|
||||||
|
|
||||||
|
|||||||
@@ -8,12 +8,12 @@ Each runner runs in an isolated **rootless Docker** environment under a dedicate
|
|||||||
|
|
||||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/grm/actions)
|
[](https://git.oblachno.oblachno.fyi/oblachno-oss/grm/actions)
|
||||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/grm/src/branch/master/LICENSE)
|
[](https://git.oblachno.oblachno.fyi/oblachno-oss/grm/src/branch/master/LICENSE)
|
||||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/grm/actions)
|
[](https://git.oblachno.oblachno.fyi/oblachno-oss/grm/actions)
|
||||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/grm/actions)
|
[](https://git.oblachno.oblachno.fyi/oblachno-oss/grm/actions)
|
||||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/grm/wiki)
|
[](https://git.oblachno.oblachno.fyi/oblachno-oss/grm/wiki)
|
||||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/grm/actions)
|
[](https://git.oblachno.oblachno.fyi/oblachno-oss/grm/actions)
|
||||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/grm/releases)
|
[](https://git.oblachno.oblachno.fyi/oblachno-oss/grm/releases)
|
||||||
[](https://www.python.org/downloads/)
|
[](https://www.python.org/downloads/)
|
||||||
|
|
||||||
## Why GRM?
|
## Why GRM?
|
||||||
|
|
||||||
|
|||||||
@@ -40,24 +40,22 @@
|
|||||||
mode: "0644"
|
mode: "0644"
|
||||||
|
|
||||||
- name: Reload systemd user daemon for healthcheck timer
|
- name: Reload systemd user daemon for healthcheck timer
|
||||||
ansible.builtin.command: systemctl --user daemon-reload
|
ansible.builtin.command: >
|
||||||
become: true
|
runuser -u {{ gitea_runner_service_user }} --
|
||||||
become_user: "{{ gitea_runner_service_user }}"
|
env XDG_RUNTIME_DIR=/run/user/{{ gitea_runner_uid }}
|
||||||
environment:
|
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/{{ gitea_runner_uid | default(0) }}/bus
|
||||||
XDG_RUNTIME_DIR: "/run/user/{{ gitea_runner_uid }}"
|
systemctl --user daemon-reload
|
||||||
DBUS_SESSION_BUS_ADDRESS: "unix:path=/run/user/{{ gitea_runner_uid | default(0) }}/bus"
|
|
||||||
changed_when: true
|
changed_when: true
|
||||||
when:
|
when:
|
||||||
- gitea_runner_systemd_available.stat.exists
|
- gitea_runner_systemd_available.stat.exists
|
||||||
- gitea_runner_docker_rootless_setup
|
- gitea_runner_docker_rootless_setup
|
||||||
|
|
||||||
- name: Enable and start healthcheck user timer
|
- name: Enable and start healthcheck user timer
|
||||||
ansible.builtin.command: systemctl --user enable --now runner-healthcheck.timer
|
ansible.builtin.command: >
|
||||||
become: true
|
runuser -u {{ gitea_runner_service_user }} --
|
||||||
become_user: "{{ gitea_runner_service_user }}"
|
env XDG_RUNTIME_DIR=/run/user/{{ gitea_runner_uid }}
|
||||||
environment:
|
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/{{ gitea_runner_uid | default(0) }}/bus
|
||||||
XDG_RUNTIME_DIR: "/run/user/{{ gitea_runner_uid }}"
|
systemctl --user enable --now runner-healthcheck.timer
|
||||||
DBUS_SESSION_BUS_ADDRESS: "unix:path=/run/user/{{ gitea_runner_uid | default(0) }}/bus"
|
|
||||||
changed_when: true
|
changed_when: true
|
||||||
when:
|
when:
|
||||||
- gitea_runner_systemd_available.stat.exists
|
- gitea_runner_systemd_available.stat.exists
|
||||||
|
|||||||
@@ -13,9 +13,9 @@
|
|||||||
- name: Include validation
|
- name: Include validation
|
||||||
ansible.builtin.include_tasks: validate.yml
|
ansible.builtin.include_tasks: validate.yml
|
||||||
|
|
||||||
|
- name: Include service setup
|
||||||
|
ansible.builtin.include_tasks: service.yml
|
||||||
|
|
||||||
- name: Include registration
|
- name: Include registration
|
||||||
ansible.builtin.include_tasks: register.yml
|
ansible.builtin.include_tasks: register.yml
|
||||||
when: not gitea_runner_skip_registration
|
when: not gitea_runner_skip_registration
|
||||||
|
|
||||||
- name: Include service setup
|
|
||||||
ansible.builtin.include_tasks: service.yml
|
|
||||||
|
|||||||
@@ -18,12 +18,11 @@
|
|||||||
register: gitea_runner_prune_timer
|
register: gitea_runner_prune_timer
|
||||||
|
|
||||||
- name: Reload systemd user daemon for prune timer
|
- name: Reload systemd user daemon for prune timer
|
||||||
ansible.builtin.command: systemctl --user daemon-reload
|
ansible.builtin.command: >
|
||||||
become: true
|
runuser -u {{ gitea_runner_service_user }} --
|
||||||
become_user: "{{ gitea_runner_service_user }}"
|
env XDG_RUNTIME_DIR=/run/user/{{ gitea_runner_uid }}
|
||||||
environment:
|
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/{{ gitea_runner_uid | default(0) }}/bus
|
||||||
XDG_RUNTIME_DIR: "/run/user/{{ gitea_runner_uid }}"
|
systemctl --user daemon-reload
|
||||||
DBUS_SESSION_BUS_ADDRESS: "unix:path=/run/user/{{ gitea_runner_uid | default(0) }}/bus"
|
|
||||||
changed_when: true
|
changed_when: true
|
||||||
when:
|
when:
|
||||||
- gitea_runner_systemd_available.stat.exists
|
- gitea_runner_systemd_available.stat.exists
|
||||||
@@ -31,12 +30,11 @@
|
|||||||
- gitea_runner_prune_service is changed or gitea_runner_prune_timer is changed
|
- gitea_runner_prune_service is changed or gitea_runner_prune_timer is changed
|
||||||
|
|
||||||
- name: Enable and start docker-prune user timer
|
- name: Enable and start docker-prune user timer
|
||||||
ansible.builtin.command: systemctl --user enable --now docker-prune.timer
|
ansible.builtin.command: >
|
||||||
become: true
|
runuser -u {{ gitea_runner_service_user }} --
|
||||||
become_user: "{{ gitea_runner_service_user }}"
|
env XDG_RUNTIME_DIR=/run/user/{{ gitea_runner_uid }}
|
||||||
environment:
|
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/{{ gitea_runner_uid | default(0) }}/bus
|
||||||
XDG_RUNTIME_DIR: "/run/user/{{ gitea_runner_uid }}"
|
systemctl --user enable --now docker-prune.timer
|
||||||
DBUS_SESSION_BUS_ADDRESS: "unix:path=/run/user/{{ gitea_runner_uid | default(0) }}/bus"
|
|
||||||
changed_when: true
|
changed_when: true
|
||||||
when:
|
when:
|
||||||
- gitea_runner_systemd_available.stat.exists
|
- gitea_runner_systemd_available.stat.exists
|
||||||
|
|||||||
@@ -44,13 +44,16 @@
|
|||||||
('already exists' not in gitea_runner_register_output.stdout | default(''))
|
('already exists' not in gitea_runner_register_output.stdout | default(''))
|
||||||
timeout: 60
|
timeout: 60
|
||||||
|
|
||||||
- name: Ensure runner service is running after registration
|
# Note: service start is handled by service.yml (included after register.yml
|
||||||
ansible.builtin.command: systemctl --user start gitea-runner
|
# in install_runner.yml). Starting here fails because the systemd unit file
|
||||||
become: true
|
# has not been created yet.
|
||||||
become_user: "{{ gitea_runner_service_user }}"
|
|
||||||
environment:
|
- name: Restart runner service after (re-)registration
|
||||||
XDG_RUNTIME_DIR: "/run/user/{{ gitea_runner_uid }}"
|
ansible.builtin.command: >
|
||||||
DBUS_SESSION_BUS_ADDRESS: "unix:path=/run/user/{{ gitea_runner_uid | default(0) }}/bus"
|
runuser -u {{ gitea_runner_service_user }} --
|
||||||
|
env XDG_RUNTIME_DIR=/run/user/{{ gitea_runner_uid }}
|
||||||
|
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/{{ gitea_runner_uid | default(0) }}/bus
|
||||||
|
systemctl --user restart gitea-runner
|
||||||
changed_when: true
|
changed_when: true
|
||||||
when:
|
when:
|
||||||
- gitea_runner_systemd_available.stat.exists
|
- gitea_runner_systemd_available.stat.exists
|
||||||
|
|||||||
@@ -143,6 +143,10 @@
|
|||||||
{% if gitea_runner_docker_rootless_net_driver == 'pasta' %}
|
{% if gitea_runner_docker_rootless_net_driver == 'pasta' %}
|
||||||
Environment="DOCKERD_ROOTLESS_ROOTLESSKIT_FLAGS=--ipv6"
|
Environment="DOCKERD_ROOTLESS_ROOTLESSKIT_FLAGS=--ipv6"
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
Restart=always
|
||||||
|
RestartSec=5
|
||||||
|
StartLimitIntervalSec=300
|
||||||
|
StartLimitBurst=10
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
owner: "{{ gitea_runner_service_user }}"
|
owner: "{{ gitea_runner_service_user }}"
|
||||||
group: "{{ gitea_runner_service_user }}"
|
group: "{{ gitea_runner_service_user }}"
|
||||||
@@ -212,22 +216,20 @@
|
|||||||
- not gitea_runner_rootless_docker_check.stat.exists
|
- not gitea_runner_rootless_docker_check.stat.exists
|
||||||
|
|
||||||
- name: Start rootless Docker daemon (systemd user service)
|
- name: Start rootless Docker daemon (systemd user service)
|
||||||
ansible.builtin.command: systemctl --user start docker
|
ansible.builtin.command: >
|
||||||
become: true
|
runuser -u {{ gitea_runner_service_user }} --
|
||||||
become_user: "{{ gitea_runner_service_user }}"
|
env XDG_RUNTIME_DIR=/run/user/{{ gitea_runner_uid }}
|
||||||
environment:
|
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/{{ gitea_runner_uid | default(0) }}/bus
|
||||||
XDG_RUNTIME_DIR: "/run/user/{{ gitea_runner_uid }}"
|
systemctl --user start docker
|
||||||
DBUS_SESSION_BUS_ADDRESS: "unix:path=/run/user/{{ gitea_runner_uid }}/bus"
|
|
||||||
changed_when: true
|
changed_when: true
|
||||||
when: gitea_runner_docker_rootless_setup
|
when: gitea_runner_docker_rootless_setup
|
||||||
|
|
||||||
- name: Enable rootless Docker daemon (systemd user service)
|
- name: Enable rootless Docker daemon (systemd user service)
|
||||||
ansible.builtin.command: systemctl --user enable docker
|
ansible.builtin.command: >
|
||||||
become: true
|
runuser -u {{ gitea_runner_service_user }} --
|
||||||
become_user: "{{ gitea_runner_service_user }}"
|
env XDG_RUNTIME_DIR=/run/user/{{ gitea_runner_uid }}
|
||||||
environment:
|
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/{{ gitea_runner_uid | default(0) }}/bus
|
||||||
XDG_RUNTIME_DIR: "/run/user/{{ gitea_runner_uid }}"
|
systemctl --user enable docker
|
||||||
DBUS_SESSION_BUS_ADDRESS: "unix:path=/run/user/{{ gitea_runner_uid }}/bus"
|
|
||||||
changed_when: true
|
changed_when: true
|
||||||
when: gitea_runner_docker_rootless_setup
|
when: gitea_runner_docker_rootless_setup
|
||||||
|
|
||||||
@@ -250,6 +252,10 @@
|
|||||||
{% if gitea_runner_docker_rootless_net_driver == 'pasta' %}
|
{% if gitea_runner_docker_rootless_net_driver == 'pasta' %}
|
||||||
Environment="DOCKERD_ROOTLESS_ROOTLESSKIT_FLAGS=--ipv6"
|
Environment="DOCKERD_ROOTLESS_ROOTLESSKIT_FLAGS=--ipv6"
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
Restart=always
|
||||||
|
RestartSec=5
|
||||||
|
StartLimitIntervalSec=300
|
||||||
|
StartLimitBurst=10
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
owner: "{{ gitea_runner_service_user }}"
|
owner: "{{ gitea_runner_service_user }}"
|
||||||
group: "{{ gitea_runner_service_user }}"
|
group: "{{ gitea_runner_service_user }}"
|
||||||
@@ -257,12 +263,11 @@
|
|||||||
when: gitea_runner_docker_rootless_setup
|
when: gitea_runner_docker_rootless_setup
|
||||||
|
|
||||||
- name: Reload systemd user daemon if network config changed
|
- name: Reload systemd user daemon if network config changed
|
||||||
ansible.builtin.command: systemctl --user daemon-reload
|
ansible.builtin.command: >
|
||||||
become: true
|
runuser -u {{ gitea_runner_service_user }} --
|
||||||
become_user: "{{ gitea_runner_service_user }}"
|
env XDG_RUNTIME_DIR=/run/user/{{ gitea_runner_uid }}
|
||||||
environment:
|
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/{{ gitea_runner_uid | default(0) }}/bus
|
||||||
XDG_RUNTIME_DIR: "/run/user/{{ gitea_runner_uid }}"
|
systemctl --user daemon-reload
|
||||||
DBUS_SESSION_BUS_ADDRESS: "unix:path=/run/user/{{ gitea_runner_uid }}/bus"
|
|
||||||
changed_when: true
|
changed_when: true
|
||||||
when:
|
when:
|
||||||
- gitea_runner_docker_rootless_setup
|
- gitea_runner_docker_rootless_setup
|
||||||
@@ -300,12 +305,11 @@
|
|||||||
when: gitea_runner_docker_rootless_setup
|
when: gitea_runner_docker_rootless_setup
|
||||||
|
|
||||||
- name: Restart rootless Docker if config changed
|
- name: Restart rootless Docker if config changed
|
||||||
ansible.builtin.command: systemctl --user restart docker
|
ansible.builtin.command: >
|
||||||
become: true
|
runuser -u {{ gitea_runner_service_user }} --
|
||||||
become_user: "{{ gitea_runner_service_user }}"
|
env XDG_RUNTIME_DIR=/run/user/{{ gitea_runner_uid }}
|
||||||
environment:
|
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/{{ gitea_runner_uid | default(0) }}/bus
|
||||||
XDG_RUNTIME_DIR: "/run/user/{{ gitea_runner_uid }}"
|
systemctl --user restart docker
|
||||||
DBUS_SESSION_BUS_ADDRESS: "unix:path=/run/user/{{ gitea_runner_uid }}/bus"
|
|
||||||
changed_when: true
|
changed_when: true
|
||||||
when:
|
when:
|
||||||
- gitea_runner_docker_rootless_setup
|
- gitea_runner_docker_rootless_setup
|
||||||
|
|||||||
@@ -9,12 +9,11 @@
|
|||||||
register: gitea_runner_service_file
|
register: gitea_runner_service_file
|
||||||
|
|
||||||
- name: Reload systemd user daemon
|
- name: Reload systemd user daemon
|
||||||
ansible.builtin.command: systemctl --user daemon-reload
|
ansible.builtin.command: >
|
||||||
become: true
|
runuser -u {{ gitea_runner_service_user }} --
|
||||||
become_user: "{{ gitea_runner_service_user }}"
|
env XDG_RUNTIME_DIR=/run/user/{{ gitea_runner_uid }}
|
||||||
environment:
|
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/{{ gitea_runner_uid | default(0) }}/bus
|
||||||
XDG_RUNTIME_DIR: "/run/user/{{ gitea_runner_uid }}"
|
systemctl --user daemon-reload
|
||||||
DBUS_SESSION_BUS_ADDRESS: "unix:path=/run/user/{{ gitea_runner_uid | default(0) }}/bus"
|
|
||||||
changed_when: true
|
changed_when: true
|
||||||
when:
|
when:
|
||||||
- gitea_runner_systemd_available.stat.exists
|
- gitea_runner_systemd_available.stat.exists
|
||||||
@@ -22,12 +21,11 @@
|
|||||||
- gitea_runner_service_file is changed
|
- gitea_runner_service_file is changed
|
||||||
|
|
||||||
- name: Restart gitea-runner if service file changed
|
- name: Restart gitea-runner if service file changed
|
||||||
ansible.builtin.command: systemctl --user restart gitea-runner
|
ansible.builtin.command: >
|
||||||
become: true
|
runuser -u {{ gitea_runner_service_user }} --
|
||||||
become_user: "{{ gitea_runner_service_user }}"
|
env XDG_RUNTIME_DIR=/run/user/{{ gitea_runner_uid }}
|
||||||
environment:
|
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/{{ gitea_runner_uid | default(0) }}/bus
|
||||||
XDG_RUNTIME_DIR: "/run/user/{{ gitea_runner_uid }}"
|
systemctl --user restart gitea-runner
|
||||||
DBUS_SESSION_BUS_ADDRESS: "unix:path=/run/user/{{ gitea_runner_uid | default(0) }}/bus"
|
|
||||||
changed_when: true
|
changed_when: true
|
||||||
when:
|
when:
|
||||||
- gitea_runner_systemd_available.stat.exists
|
- gitea_runner_systemd_available.stat.exists
|
||||||
@@ -35,12 +33,11 @@
|
|||||||
- gitea_runner_service_file is changed
|
- gitea_runner_service_file is changed
|
||||||
|
|
||||||
- name: Enable and start gitea-runner user service
|
- name: Enable and start gitea-runner user service
|
||||||
ansible.builtin.command: systemctl --user enable --now gitea-runner
|
ansible.builtin.command: >
|
||||||
become: true
|
runuser -u {{ gitea_runner_service_user }} --
|
||||||
become_user: "{{ gitea_runner_service_user }}"
|
env XDG_RUNTIME_DIR=/run/user/{{ gitea_runner_uid }}
|
||||||
environment:
|
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/{{ gitea_runner_uid | default(0) }}/bus
|
||||||
XDG_RUNTIME_DIR: "/run/user/{{ gitea_runner_uid }}"
|
systemctl --user enable --now gitea-runner
|
||||||
DBUS_SESSION_BUS_ADDRESS: "unix:path=/run/user/{{ gitea_runner_uid | default(0) }}/bus"
|
|
||||||
changed_when: true
|
changed_when: true
|
||||||
when:
|
when:
|
||||||
- gitea_runner_systemd_available.stat.exists
|
- gitea_runner_systemd_available.stat.exists
|
||||||
|
|||||||
+6
-6
@@ -8,12 +8,12 @@ Each runner runs in an isolated **rootless Docker** environment under a dedicate
|
|||||||
|
|
||||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/grm/actions)
|
[](https://git.oblachno.oblachno.fyi/oblachno-oss/grm/actions)
|
||||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/grm/src/branch/master/LICENSE)
|
[](https://git.oblachno.oblachno.fyi/oblachno-oss/grm/src/branch/master/LICENSE)
|
||||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/grm/actions)
|
[](https://git.oblachno.oblachno.fyi/oblachno-oss/grm/actions)
|
||||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/grm/actions)
|
[](https://git.oblachno.oblachno.fyi/oblachno-oss/grm/actions)
|
||||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/grm/wiki)
|
[](https://git.oblachno.oblachno.fyi/oblachno-oss/grm/wiki)
|
||||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/grm/actions)
|
[](https://git.oblachno.oblachno.fyi/oblachno-oss/grm/actions)
|
||||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/grm/releases)
|
[](https://git.oblachno.oblachno.fyi/oblachno-oss/grm/releases)
|
||||||
[](https://www.python.org/downloads/)
|
[](https://www.python.org/downloads/)
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -36,7 +36,7 @@ ci = [
|
|||||||
"build==1.5.1",
|
"build==1.5.1",
|
||||||
"twine==6.2.0",
|
"twine==6.2.0",
|
||||||
# Reusable CI/CD and dev tools (auto-merge, pr-review, pre-push checks, etc.)
|
# Reusable CI/CD and dev tools (auto-merge, pr-review, pre-push checks, etc.)
|
||||||
"devx @ git+https://git.oblachno.oblachno.fyi/oblachno-oss/devx.git@v0.48.1",
|
"devx @ git+https://git.oblachno.oblachno.fyi/oblachno-oss/devx.git@v0.50.1",
|
||||||
]
|
]
|
||||||
# Lint and type-checking tools (validate job)
|
# Lint and type-checking tools (validate job)
|
||||||
lint = [
|
lint = [
|
||||||
@@ -56,7 +56,7 @@ molecule = [
|
|||||||
dev = [
|
dev = [
|
||||||
"grm[ci,lint,molecule]",
|
"grm[ci,lint,molecule]",
|
||||||
# Reusable CI/CD and dev tools (pre-push hooks, create-task, create-pr)
|
# Reusable CI/CD and dev tools (pre-push hooks, create-task, create-pr)
|
||||||
"devx @ git+https://git.oblachno.oblachno.fyi/oblachno-oss/devx.git@v0.48.1",
|
"devx @ git+https://git.oblachno.oblachno.fyi/oblachno-oss/devx.git@v0.50.1",
|
||||||
# Non-Python dev dependency: checkmake (Makefile linter)
|
# Non-Python dev dependency: checkmake (Makefile linter)
|
||||||
# Install via: go install github.com/checkmake/checkmake/cmd/checkmake@latest
|
# Install via: go install github.com/checkmake/checkmake/cmd/checkmake@latest
|
||||||
]
|
]
|
||||||
|
|||||||
+1
-1
@@ -1,3 +1,3 @@
|
|||||||
"""Gitea Runner Manager — lean CLI for managing Gitea Actions runners."""
|
"""Gitea Runner Manager — lean CLI for managing Gitea Actions runners."""
|
||||||
|
|
||||||
__version__ = "0.20.0"
|
__version__ = "0.21.1"
|
||||||
|
|||||||
Reference in New Issue
Block a user