67 lines
1.5 KiB
YAML
67 lines
1.5 KiB
YAML
---
|
|
- name: Install OpenQA worker packages
|
|
ansible.builtin.dnf:
|
|
name: "{{ openqa_worker_packages }}"
|
|
state: present
|
|
tags:
|
|
- packages
|
|
|
|
- name: Create openQA group
|
|
ansible.builtin.group:
|
|
name: "{{ openqa_group }}"
|
|
system: true
|
|
|
|
- name: Create openQA user
|
|
ansible.builtin.user:
|
|
name: "{{ openqa_user }}"
|
|
groups: "{{ openqa_group }}"
|
|
append: true
|
|
system: true
|
|
|
|
- name: Configure firewalld for openQA worker connections
|
|
ansible.builtin.template:
|
|
src: etc/firewalld/services/{{ item }}.xml.j2
|
|
dest: /etc/firewalld/services/{{ item }}.xml
|
|
owner: root
|
|
group: root
|
|
mode: "0644"
|
|
loop:
|
|
- openqa-socket
|
|
- openqa-vnc
|
|
tags:
|
|
- configure
|
|
|
|
- name: Reload firewalld
|
|
ansible.builtin.systemd:
|
|
name: firewalld
|
|
state: reloaded
|
|
tags:
|
|
- configure
|
|
ignore_errors: "{{ ansible_check_mode }}"
|
|
|
|
- name: Write openQA configuration file
|
|
ansible.builtin.template:
|
|
src: etc/openqa/{{ item }}.j2
|
|
dest: /etc/openqa/{{ item }}
|
|
owner: "{{ openqa_user }}"
|
|
group: "{{ openqa_group }}"
|
|
mode: "0444"
|
|
loop:
|
|
- client.conf
|
|
- workers.conf
|
|
tags:
|
|
- configure
|
|
|
|
- name: Start openQA workers
|
|
ansible.builtin.systemd:
|
|
name: "openqa-worker@{{ item }}"
|
|
state: started
|
|
enabled: true
|
|
# range "end" parameter is exclusive, so add 1
|
|
loop: "{{ range(1, (openqa_worker_count | int + 1)) | list }}"
|
|
tags:
|
|
- start_workers
|
|
- configure
|
|
ignore_errors: "{{ ansible_check_mode }}"
|
|
...
|