: replace docker with podman
Some checks failed
ansible-lint / lint-everything (push) Has been cancelled

This commit is contained in:
VC
2025-11-23 16:28:38 +01:00
parent e4c66c065f
commit 17aabc49a3
10 changed files with 56 additions and 54 deletions

View File

@@ -7,8 +7,10 @@
system: true
create_home: true
home: "{{ act_runner_home }}"
groups:
- docker
register: _act_runner_user
- name: Configure act_runner user
ansible.builtin.include_tasks: user.yml
- name: Download act_runner executable
ansible.builtin.get_url:

View File

@@ -0,0 +1,33 @@
---
- name: Create act_runner user
ansible.builtin.user:
name: "{{ act_runner_user }}"
state: present
system: true
create_home: true
home: "{{ act_runner_home }}"
register: _act_runner_user
- name: Configure subuid/subgid
ansible.builtin.lineinfile:
path: "/etc/{{ item }}"
state: present
line: "{{ act_runner_user }}:100000:65536"
loop:
- subuid
- subgid
- name: Enable linger
ansible.builtin.command:
cmd: "/usr/bin/loginctl enable-linger {{ act_runner_user }}"
creates: "/var/lib/systemd/linger/{{ act_runner_user }}"
- name: Ensure podman is started
ansible.builtin.systemd_service:
name: podman.socket
state: started
enabled: true
scope: user
become: true
become_user: "{{ act_runner_user }}"

View File

@@ -11,6 +11,7 @@ TimeoutSec=0
RestartSec=10
Restart=always
User={{ act_runner_user }}
Environment=DOCKER_HOST="unix:///run/user/{{ _act_runner_user.uid }}/podman/podman.sock"
[Install]
WantedBy=multi-user.target

View File

@@ -2,7 +2,7 @@
act_runner_version: "0.2.13"
act_runner_url: "https://gitea.com/gitea/act_runner/releases/download/v{{ act_runner_version }}/act_runner-{{ act_runner_version }}-linux-amd64"
act_runner_home: "/var/lib/act_runner"
act_runner_home: "/srv/act_runner"
act_runner_bin: "/usr/local/bin/act_runner"
act_runner_user: "act_runner"