From c32e2781908edf7fc6bbc21c4576f511c3aa0a95 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Mon, 6 Mar 2017 16:35:18 -0800 Subject: [PATCH] Switch from git checkout to packaged install of openqa_client In check-compose and openqa/dispatcher roles, now it's packaged. --- roles/check-compose/tasks/main.yml | 39 +++++++++----------------- roles/openqa/dispatcher/tasks/main.yml | 25 ++++------------- 2 files changed, 19 insertions(+), 45 deletions(-) diff --git a/roles/check-compose/tasks/main.yml b/roles/check-compose/tasks/main.yml index 4c7db6a8ab..729a007db5 100644 --- a/roles/check-compose/tasks/main.yml +++ b/roles/check-compose/tasks/main.yml @@ -27,42 +27,29 @@ # client.conf will be in place (and localhost default would be correct # anyhow) -# note: we need updates-testing until fedfind 3.5.0 goes stable -- name: Install required packages (testing) - dnf: name={{ item }} state=present enablerepo="updates-testing" - with_items: - - python2-fedfind - tags: - - packages +#- name: Install required packages (testing) +# dnf: name={{ item }} state=present enablerepo="updates-testing" +# with_items: +# - python2-fedfind +# tags: +# - packages + +# fileglob doesn't do directory names, so we can't really do this +# ansiblifically +- name: Remove old from-source openQA-python-client install + shell: "rm -rf /usr/lib/python2.?/site-packages/openqa_client*" - name: Install required packages dnf: name={{ item }} state=present with_items: + - python2-fedfind - python2-fedmsg-consumers + - python2-openqa_client - python-setuptools - python-six 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 - check_mode: no - changed_when: "1 != 1" - failed_when: "1 != 1" - -- name: Install openQA-python-client - command: "python setup.py install" - args: - chdir: /root/openQA-python-client - when: "gitclient|changed or instclient.rc > 0" - - name: Check out check-compose git: repo: https://pagure.io/fedora-qa/check-compose.git diff --git a/roles/openqa/dispatcher/tasks/main.yml b/roles/openqa/dispatcher/tasks/main.yml index 9c0d1c4f78..0fa36638ef 100644 --- a/roles/openqa/dispatcher/tasks/main.yml +++ b/roles/openqa/dispatcher/tasks/main.yml @@ -45,11 +45,17 @@ # tags: # - packages +# fileglob doesn't do directory names, so we can't really do this +# ansiblifically +- name: Remove old from-source openQA-python-client install + shell: "rm -rf /usr/lib/python2.?/site-packages/openqa_client*" + - name: Install required packages dnf: name={{ item }} state=present with_items: - python2-fedfind - python2-fedmsg-consumers + - python2-openqa_client - python2-requests - python-resultsdb_api - python-setuptools @@ -58,25 +64,6 @@ 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