Compare commits
3 Commits
1a523b843c
...
7c36cec3b7
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7c36cec3b7 | ||
|
|
55e51548c4 | ||
|
|
6a1bd2d258 |
91
host-as-runner-config.yml
Normal file
91
host-as-runner-config.yml
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
---
|
||||||
|
- name: More advanced setup, to use host itself as runner
|
||||||
|
hosts: gitrunner
|
||||||
|
become: true
|
||||||
|
gather_facts: true
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
- name: Ensure required repositories are enabled
|
||||||
|
ansible.builtin.dnf:
|
||||||
|
name:
|
||||||
|
- dnf-plugins-core
|
||||||
|
state: present
|
||||||
|
update_cache: true
|
||||||
|
|
||||||
|
- name: Install required packages with error handling
|
||||||
|
ansible.builtin.dnf:
|
||||||
|
name:
|
||||||
|
- mock
|
||||||
|
- anaconda
|
||||||
|
- lorax
|
||||||
|
- make
|
||||||
|
- git
|
||||||
|
- gcc
|
||||||
|
- gcc-c++
|
||||||
|
- cmake
|
||||||
|
- clang
|
||||||
|
- clang-tools-extra
|
||||||
|
- python3
|
||||||
|
- python3-pip
|
||||||
|
- python3-devel
|
||||||
|
- python3-setuptools
|
||||||
|
- python3-wheel
|
||||||
|
- nodejs
|
||||||
|
- npm
|
||||||
|
- ruby
|
||||||
|
- ruby-devel
|
||||||
|
- rust
|
||||||
|
- cargo
|
||||||
|
- go
|
||||||
|
- perl
|
||||||
|
- perl-Module-Build
|
||||||
|
- perl-ExtUtils-MakeMaker
|
||||||
|
- gettext
|
||||||
|
- wget
|
||||||
|
- curl
|
||||||
|
- unzip
|
||||||
|
- tar
|
||||||
|
- gzip
|
||||||
|
- bzip2
|
||||||
|
- xz
|
||||||
|
- vim
|
||||||
|
- which
|
||||||
|
- procps-ng
|
||||||
|
- findutils
|
||||||
|
- coreutils
|
||||||
|
- diffutils
|
||||||
|
- patch
|
||||||
|
- shadow-utils
|
||||||
|
- util-linux
|
||||||
|
- grep
|
||||||
|
- sed
|
||||||
|
- bash
|
||||||
|
- zsh
|
||||||
|
- openssh-clients
|
||||||
|
- openssl
|
||||||
|
- ca-certificates
|
||||||
|
- libarchive
|
||||||
|
- libtool
|
||||||
|
- automake
|
||||||
|
- autoconf
|
||||||
|
- libffi-devel
|
||||||
|
- openssl-devel
|
||||||
|
- zlib-devel
|
||||||
|
- bison
|
||||||
|
- flex
|
||||||
|
- gdb
|
||||||
|
- strace
|
||||||
|
- ltrace
|
||||||
|
- valgrind
|
||||||
|
state: present
|
||||||
|
update_cache: true
|
||||||
|
allow_downgrade: false
|
||||||
|
|
||||||
|
- name: Clean dnf cache
|
||||||
|
ansible.builtin.command: dnf clean all
|
||||||
|
changed_when: true
|
||||||
|
|
||||||
|
- name: Remove dnf cache directory
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: /var/cache/dnf
|
||||||
|
state: absent
|
||||||
@@ -40,6 +40,6 @@
|
|||||||
|
|
||||||
- name: Set hostname to configured value (if needed)
|
- name: Set hostname to configured value (if needed)
|
||||||
ansible.builtin.hostname:
|
ansible.builtin.hostname:
|
||||||
name: fedora-cloud
|
name: act
|
||||||
when:
|
when:
|
||||||
- current_hostname.stdout != "fedora-cloud"
|
- current_hostname.stdout != "act"
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
|
|
||||||
runner:
|
runner:
|
||||||
file: "/var/lib/act_runner/.runner"
|
file: "/var/lib/act_runner/.runner"
|
||||||
capacity: 1
|
capacity: 4
|
||||||
timeout: 3h
|
timeout: 3h
|
||||||
shutdown_timeout: 0s
|
shutdown_timeout: 0s
|
||||||
insecure: false
|
insecure: false
|
||||||
@@ -51,13 +51,14 @@
|
|||||||
fetch_interval: 2s
|
fetch_interval: 2s
|
||||||
github_mirror: ''
|
github_mirror: ''
|
||||||
labels:
|
labels:
|
||||||
- "fedora-cloud-42:docker://git.phyllo.me/roots/fedora-iso-creation:42"
|
- "fedora-cloud-42:docker://git.phyllo.me/devops/fedora-runner-image:latest"
|
||||||
- "ubuntu-latest:docker://docker.gitea.com/runner-images:ubuntu-latest"
|
- "ubuntu-latest:docker://docker.gitea.com/runner-images:ubuntu-latest"
|
||||||
- "ubuntu-latest-full:docker://docker.gitea.com/runner-images:ubuntu-latest-full"
|
- "ubuntu-latest-full:docker://docker.gitea.com/runner-images:ubuntu-latest-full"
|
||||||
|
- "fedora-cloud-42:host"
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
enabled: true
|
enabled: true
|
||||||
dir:
|
dir: /var/lib/act_runner/.act-runner/actcache
|
||||||
host: ""
|
host: ""
|
||||||
port: 0
|
port: 0
|
||||||
external_server: ""
|
external_server: ""
|
||||||
@@ -75,13 +76,14 @@
|
|||||||
docker_timeout: 0s
|
docker_timeout: 0s
|
||||||
|
|
||||||
host:
|
host:
|
||||||
workdir_parent:
|
workdir_parent: /var/lib/act_runner/act-runner/workdir
|
||||||
|
|
||||||
dest: /etc/act_runner/config.yaml
|
dest: /etc/act_runner/config.yaml
|
||||||
owner: "act_runner"
|
owner: "act_runner"
|
||||||
group: "act_runner"
|
group: "act_runner"
|
||||||
mode: "0755"
|
mode: "0755"
|
||||||
backup: true
|
backup: true
|
||||||
|
register: config_file
|
||||||
|
|
||||||
- name: Check if runner is already registered
|
- name: Check if runner is already registered
|
||||||
ansible.builtin.stat:
|
ansible.builtin.stat:
|
||||||
@@ -96,6 +98,7 @@
|
|||||||
--name fedora-bios-0
|
--name fedora-bios-0
|
||||||
when: not runner_registered.stat.exists
|
when: not runner_registered.stat.exists
|
||||||
changed_when: true
|
changed_when: true
|
||||||
|
notify: restart act runner service
|
||||||
|
|
||||||
- name: Create Act Runner service file
|
- name: Create Act Runner service file
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
@@ -116,12 +119,13 @@
|
|||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
dest: /etc/systemd/system/act_runner.service
|
dest: /etc/systemd/system/act_runner.service
|
||||||
mode: "0755"
|
mode: "0644"
|
||||||
backup: true
|
backup: true
|
||||||
|
notify: restart act runner service
|
||||||
|
|
||||||
- name: Ensure act_runner service is enabled and started
|
- name: Ensure act_runner service is enabled and started
|
||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd:
|
||||||
name: act_runner
|
name: act_runner
|
||||||
enabled: true
|
enabled: true
|
||||||
state: started
|
state: started
|
||||||
daemon_reload: true
|
daemon_reload: true
|
||||||
Reference in New Issue
Block a user