Files
fedora-infra_ansible/roles/openqa/worker/tasks/main.yml
2016-10-26 14:15:50 -07:00

49 lines
1.3 KiB
YAML

# Required vars
# - openqa_workers
## integer - number of worker instances to create/run
# Required vars with defaults
# - openqa_hostname
## string - hostname of openQA server to run jobs for
## default - localhost
# Optional vars
# - openqa_tap
## bool - whether this is the tap-enabled host or not
## each deployment should have *one* tap-capable worker host
- name: Install required packages (testing)
dnf: name={{ item }} state=present enablerepo="updates-testing"
with_items:
- openqa-worker
tags:
- packages
- name: Install packages
dnf: name={{ item }} state=present
with_items:
- libselinux-python
- edk2-ovmf
tags:
- packages
- include: nfs-client.yml
when: openqa_hostname is defined and openqa_hostname != "localhost"
- include: tap-setup.yml
when: openqa_tap is defined and openqa_tap
- name: openQA client config
template: src=client.conf.j2 dest=/etc/openqa/client.conf owner=_openqa-worker group=root mode=0600
tags:
- config
- name: openQA worker config
template: src=workers.ini.j2 dest=/etc/openqa/workers.ini owner=_openqa-worker group=root mode=0644
tags:
- config
- name: Enable and start worker services
service: name=openqa-worker@{{ item }} enabled=yes state=started
with_sequence: "count={{ openqa_workers }}"