Skip to content
Snippets Groups Projects
Verified Commit eb8f5887 authored by Kristian Klausen's avatar Kristian Klausen :tada:
Browse files

gitlab_vm_runners group

parent fcd9b630
No related branches found
No related tags found
No related merge requests found
Pipeline #23247 passed
......@@ -90,6 +90,10 @@ runner1.archlinux.org
runner2.archlinux.org
secure-runner1.archlinux.org
[gitlab_vm_runners]
runner1.archlinux.org
secure-runner1.archlinux.org
[reproduciblebuilds]
repro1.pkgbuild.com
......
......@@ -11,5 +11,5 @@
- { role: fail2ban }
- { role: prometheus_exporters }
- { role: promtail }
- { role: libvirt }
- { role: libvirt, when: "'gitlab_vm_runners' in group_names" }
- { role: gitlab_runner }
- name: install dependencies
pacman: name=docker,python-docker,python-gitlab,gitlab-runner,arch-install-scripts,sequoia-sq state=latest update_cache=yes
pacman: name=docker,python-docker,python-gitlab,gitlab-runner state=latest update_cache=yes
notify: restart gitlab-runner
- name: install docker.slice
......@@ -60,30 +60,36 @@
- name: enable and start gitlab runner service
systemd: name=gitlab-runner state=started enabled=yes daemon_reload=yes
- name: create libvirt-executor configuration and data directories
file: path={{ item }} state=directory owner=root group=root mode=0755
loop:
- /etc/libvirt-executor
- /usr/local/lib/libvirt-executor
- name: setup libvirt-executor
block:
- name: install libvirt-executor-update-base-image dependencies
pacman: name=arch-install-scripts,sequoia-sq state=present
- name: install libvirt-executor
copy: src={{ item.src }} dest={{ item.dest }} owner=root group=root mode={{ item.mode }}
loop:
- {src: arch-boxes.asc, dest: /usr/local/lib/libvirt-executor/, mode: 644}
- {src: domain_template.xml, dest: /usr/local/lib/libvirt-executor/, mode: 755}
- {src: libvirt-executor, dest: /usr/local/sbin/, mode: 755}
- {src: libvirt-executor-update-base-image, dest: /usr/local/sbin/, mode: 755}
- name: create libvirt-executor configuration and data directories
file: path={{ item }} state=directory owner=root group=root mode=0755
loop:
- /etc/libvirt-executor
- /usr/local/lib/libvirt-executor
- name: create SSH keys for libvirt-executor
command: ssh-keygen -N "" -f /etc/libvirt-executor/id_rsa
args:
creates: /etc/libvirt-executor/id_rsa
- name: install libvirt-executor
copy: src={{ item.src }} dest={{ item.dest }} owner=root group=root mode={{ item.mode }}
loop:
- {src: arch-boxes.asc, dest: /usr/local/lib/libvirt-executor/, mode: 644}
- {src: domain_template.xml, dest: /usr/local/lib/libvirt-executor/, mode: 755}
- {src: libvirt-executor, dest: /usr/local/sbin/, mode: 755}
- {src: libvirt-executor-update-base-image, dest: /usr/local/sbin/, mode: 755}
- name: install libvirt-executor-update-base-image.{service,timer}
copy: src={{ item }} dest=/etc/systemd/system/{{ item }} owner=root group=root mode=0644
loop:
- libvirt-executor-update-base-image.service
- libvirt-executor-update-base-image.timer
- name: create SSH keys for libvirt-executor
command: ssh-keygen -N "" -f /etc/libvirt-executor/id_rsa
args:
creates: /etc/libvirt-executor/id_rsa
- name: install libvirt-executor-update-base-image.{service,timer}
copy: src={{ item }} dest=/etc/systemd/system/{{ item }} owner=root group=root mode=0644
loop:
- libvirt-executor-update-base-image.service
- libvirt-executor-update-base-image.timer
- name: enable and start libvirt-executor-update-base-image.timer
systemd: name=libvirt-executor-update-base-image.timer state=started enabled=yes daemon_reload=yes
- name: enable and start libvirt-executor-update-base-image.timer
systemd: name=libvirt-executor-update-base-image.timer state=started enabled=yes daemon_reload=yes
when: "'gitlab_vm_runners' in group_names"
......@@ -23,6 +23,7 @@ listen_address = ":9252"
disable_cache = false
volumes = ["/cache"]
shm_size = 0
{%- if 'gitlab_vm_runners' in group_names %}
[[runners]]
name = "{{ inventory_hostname }}"
......@@ -42,3 +43,4 @@ listen_address = ":9252"
cleanup_exec = "/usr/local/sbin/libvirt-executor"
cleanup_args = [ "cleanup" ]
{% endif %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment