We split fedora_openqa and createhdds out into their own repos, this should adapt to the change (I hope).
141 lines
4.6 KiB
YAML
141 lines
4.6 KiB
YAML
# Required vars with defaults
|
|
# - openqa_hostname
|
|
## string - hostname of openQA server to run jobs for
|
|
## default - localhost
|
|
# - openqa_consumer
|
|
## bool - whether to enable the fedmsg consumer and run whenever
|
|
## a compose completes
|
|
## default - true
|
|
# - external_hostname
|
|
## string - The public hostname of the openQA server (used in ResultsDB links)
|
|
## default - ansible_nodename
|
|
#
|
|
# Optional vars
|
|
# - wikitcms_user
|
|
## string - FAS username for reporting results to wiki
|
|
# - wikitcms_password
|
|
## string - password for relval_user
|
|
# - deployment_type
|
|
## string - Fedora Infrastructure thing; for this role, the
|
|
## fedora_openqa config file will be set appropriately
|
|
## for infra deployments if this is set, so don't set
|
|
## it for private deployments
|
|
#
|
|
# When all of the above are set, a wikitcms 'credentials' file will
|
|
# be created and result submission to the wiki will be enabled. If
|
|
# deployment_type is set to 'prod', results will be submitted to the
|
|
# production wiki in response to openQA production 'job complete'
|
|
# fedmsgs; if set to 'stg', results will be submitted to the staging
|
|
# wiki in response to openQA staging 'job complete' fedmsgs. Result
|
|
# reporting to ResultsDB will also be enabled for the production
|
|
# deployment. You probably should NOT set these unless you're
|
|
# maintaining the Fedora infrastructure deployments.
|
|
#
|
|
# NOTE: There are still currently a couple of assumptions that the
|
|
# openQA server boxes will always act as their own dispatchers, but
|
|
# there is no longer any fundamental reason why this must be the case,
|
|
# as we now use the openQA asset downloading capability so that the
|
|
# scheduler is no longer responsible for downloading assets.
|
|
|
|
# just keeping this around for convenience as we often need it
|
|
#- name: Install required packages (testing)
|
|
# dnf: name={{ item }} state=present enablerepo="updates-testing"
|
|
# with_items:
|
|
|
|
# tags:
|
|
# - packages
|
|
|
|
- name: Install required packages
|
|
dnf: name={{ item }} state=present
|
|
with_items:
|
|
- fedfind
|
|
- python2-fedmsg-consumers
|
|
- python2-requests
|
|
- python-resultsdb_api
|
|
- python-setuptools
|
|
- python-six
|
|
- python2-wikitcms
|
|
tags:
|
|
- packages
|
|
|
|
- name: Check out openQA-python-client
|
|
git:
|
|
repo: https://github.com/os-autoinst/openQA-python-client.git
|
|
dest: /root/openQA-python-client
|
|
register: gitclient
|
|
|
|
- name: Check if python-client has ever been installed
|
|
command: "python -c 'import openqa_client'"
|
|
register: instclient
|
|
changed_when: "1 != 1"
|
|
failed_when: "1 != 1"
|
|
check_mode: no
|
|
|
|
- name: Install openQA-python-client
|
|
command: "python setup.py install"
|
|
args:
|
|
chdir: /root/openQA-python-client
|
|
when: "gitclient|changed or instclient.rc > 0"
|
|
|
|
- name: Remove old openqa_fedora_tools checkout
|
|
file: path=/root/openqa_fedora_tools-dispatcher state=absent
|
|
|
|
- name: Remove old fedora-openqa-schedule script
|
|
file: path=/usr/bin/fedora-openqa-schedule state=absent
|
|
|
|
- name: Check out fedora_openqa (scheduler / reporter tool)
|
|
git:
|
|
repo: https://pagure.io/fedora-qa/fedora_openqa.git
|
|
dest: /root/fedora_openqa
|
|
register: gittools
|
|
|
|
- name: Check if fedora_openqa has ever been installed
|
|
stat: path=/usr/bin/fedora-openqa
|
|
register: insttools
|
|
changed_when: "1 != 1"
|
|
failed_when: "1 != 1"
|
|
check_mode: no
|
|
|
|
- name: Install fedora_openqa
|
|
command: "python setup.py install"
|
|
args:
|
|
chdir: /root/fedora_openqa
|
|
when: "gittools|changed or not insttools.stat.exists"
|
|
notify:
|
|
- restart fedmsg-hub
|
|
|
|
- name: openQA client config
|
|
template: src=client.conf.j2 dest=/etc/openqa/client.conf owner=root group=fedmsg mode=0640
|
|
tags:
|
|
- config
|
|
|
|
- name: Create fedora_openqa config directory
|
|
file: path=/etc/fedora-openqa state=directory owner=root group=root mode=0755
|
|
|
|
- name: Write schedule.conf
|
|
template: src=schedule.conf.j2 dest=/etc/fedora-openqa/schedule.conf owner=root group=root mode=0644
|
|
notify:
|
|
- restart fedmsg-hub
|
|
tags:
|
|
- config
|
|
|
|
- name: Create /etc/fedora (credentials files location)
|
|
file: path=/etc/fedora state=directory owner=root group=fedmsg mode=0750
|
|
|
|
- name: Write wikitcms credentials file
|
|
template: src=credentials.j2 dest=/etc/fedora/credentials owner=root group=fedmsg mode=0640
|
|
when: "wikitcms_user is defined and wikitcms_password is defined"
|
|
tags:
|
|
- config
|
|
|
|
- name: Enable fedmsg consumer
|
|
template: src=openqa_consumer.py.j2 dest=/etc/fedmsg.d/openqa_consumer.py owner=root group=root mode=0644
|
|
notify:
|
|
- restart fedmsg-hub
|
|
tags:
|
|
- config
|
|
|
|
- name: Set up cron job to schedule live-respins jobs
|
|
copy: src=schedule-live-respins.cron dest=/etc/cron.hourly/schedule-live-respins owner=root group=root mode=0755
|
|
tags:
|
|
- config
|