2023-02-18 18:46:41 +00:00
|
|
|
---
|
|
|
|
- name: Install OpenQA worker packages
|
2023-02-18 20:35:36 +00:00
|
|
|
ansible.builtin.dnf:
|
2023-02-18 18:46:41 +00:00
|
|
|
name: "{{ openqa_worker_packages }}"
|
|
|
|
state: present
|
|
|
|
tags:
|
|
|
|
- packages
|
|
|
|
|
|
|
|
- name: Create openQA group
|
2023-02-18 20:35:36 +00:00
|
|
|
ansible.builtin.group:
|
2023-02-18 18:46:41 +00:00
|
|
|
name: "{{ openqa_group }}"
|
|
|
|
system: true
|
|
|
|
|
|
|
|
- name: Create openQA user
|
2023-02-18 20:35:36 +00:00
|
|
|
ansible.builtin.user:
|
2023-02-18 18:46:41 +00:00
|
|
|
name: "{{ openqa_user }}"
|
|
|
|
groups: "{{ openqa_group }}"
|
|
|
|
append: true
|
|
|
|
system: true
|
|
|
|
|
|
|
|
- name: Configure firewalld for openQA worker connections
|
2023-02-18 20:35:36 +00:00
|
|
|
ansible.builtin.template:
|
2023-02-18 18:46:41 +00:00
|
|
|
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
|
2023-02-27 16:07:27 +00:00
|
|
|
notify: Reload firewalld
|
2023-02-18 18:46:41 +00:00
|
|
|
|
|
|
|
- name: Write openQA configuration file
|
2023-02-18 20:35:36 +00:00
|
|
|
ansible.builtin.template:
|
2023-02-18 18:46:41 +00:00
|
|
|
src: etc/openqa/{{ item }}.j2
|
|
|
|
dest: /etc/openqa/{{ item }}
|
|
|
|
owner: "{{ openqa_user }}"
|
|
|
|
group: "{{ openqa_group }}"
|
|
|
|
mode: "0444"
|
|
|
|
loop:
|
|
|
|
- client.conf
|
|
|
|
- workers.conf
|
|
|
|
tags:
|
|
|
|
- configure
|
|
|
|
|
2023-02-18 20:35:36 +00:00
|
|
|
- name: Start openQA workers
|
2023-02-18 18:46:41 +00:00
|
|
|
ansible.builtin.systemd:
|
|
|
|
name: "openqa-worker@{{ item }}"
|
|
|
|
state: started
|
|
|
|
enabled: true
|
|
|
|
# range "end" parameter is exclusive, so add 1
|
2023-02-18 20:35:36 +00:00
|
|
|
loop: "{{ range(1, (openqa_worker_count | int + 1)) | list }}"
|
2023-02-18 18:46:41 +00:00
|
|
|
tags:
|
|
|
|
- start_workers
|
|
|
|
- configure
|
|
|
|
ignore_errors: "{{ ansible_check_mode }}"
|
2023-02-27 16:03:14 +00:00
|
|
|
|
|
|
|
- name: Start openQA cache services
|
|
|
|
ansible.builtin.systemd:
|
|
|
|
name: "{{ item }}"
|
|
|
|
state: started
|
|
|
|
enabled: true
|
|
|
|
loop:
|
|
|
|
- openqa-worker-cacheservice
|
|
|
|
- openqa-worker-cacheservice-minion
|
2023-02-18 18:46:41 +00:00
|
|
|
...
|