diff --git a/roles/autocloudreporter/tasks/main.yml b/roles/autocloudreporter/tasks/main.yml index b1db75f10b..798caa8c66 100644 --- a/roles/autocloudreporter/tasks/main.yml +++ b/roles/autocloudreporter/tasks/main.yml @@ -22,7 +22,7 @@ - name: Install required packages (Python 3) dnf: - name: ['python2-pip, python3-fedfind', 'python3-fedmsg', 'python3-resultsdb_api', + name: ['python3-fedfind', 'python3-fedmsg', 'python3-resultsdb_api', 'python3-resultsdb_conventions-fedora', 'python3-setuptools'] state: present when: "'python34-fedmsg' in group_names" @@ -52,9 +52,17 @@ notify: - restart fedmsg-hub +- name: Install python2-pip if needed to remove py2 autocloudreporter + dnf: + name: python2-pip + state: present + when: "py2acrinstalled is defined and py2acrinstalled.files and 'python34-fedmsg' in group_names" + tags: + - packages + - name: Remove autocloudreporter (Python 2) command: "pip2 uninstall --disable-pip-version-check --yes autocloudreporter" - when: "py2acrinstalled is defined and py2acrinstalled and 'python34-fedmsg' in group_names" + when: "py2acrinstalled is defined and py2acrinstalled.files and 'python34-fedmsg' in group_names" notify: - restart fedmsg-hub @@ -62,7 +70,7 @@ command: "python3 setup.py install" args: chdir: /root/autocloudreporter - when: "(gitacr is changed or (py2acrinstalled is defined and py2acrinstalled)) and 'python34-fedmsg' in group_names" + when: "(gitacr is changed or (py2acrinstalled is defined and py2acrinstalled.files)) and 'python34-fedmsg' in group_names" notify: - restart fedmsg-hub @@ -76,7 +84,7 @@ - name: Remove Python 2 packages dnf: name: ['python2-fedfind', 'python2-fedmsg', 'python2-resultsdb_api', - 'python2-resultsdb_conventions-fedora', 'python2-setuptools'] + 'python2-resultsdb_conventions-fedora'] state: absent when: "'python34-fedmsg' in group_names" tags: diff --git a/roles/check-compose/tasks/main.yml b/roles/check-compose/tasks/main.yml index 330a79f305..e3621ffcd0 100644 --- a/roles/check-compose/tasks/main.yml +++ b/roles/check-compose/tasks/main.yml @@ -51,7 +51,7 @@ - name: Install required packages (Python 3) dnf: - name: ['python2-pip', 'python3-fedfind', 'python3-fedmsg', 'python3-openqa_client', + name: ['python3-fedfind', 'python3-fedmsg', 'python3-openqa_client', 'python3-setuptools', 'python3-six'] state: present when: "'python34-fedmsg' in group_names" @@ -81,6 +81,14 @@ notify: - restart fedmsg-hub +- name: Install python2-pip if needed to remove py2 check-compose + dnf: + name: python2-pip + state: present + when: "py2ccinstalled is defined and py2ccinstalled.files and 'python34-fedmsg' in group_names" + tags: + - packages + - name: Remove check-compose (Python 2) command: "pip2 uninstall --disable-pip-version-check --yes check-compose" when: "py2ccinstalled is defined and py2ccinstalled.files and 'python34-fedmsg' in group_names" @@ -104,8 +112,7 @@ - name: Remove Python 2 packages dnf: - name: ['python2-fedfind', 'python2-fedmsg', 'python2-openqa_client', - 'python2-setuptools', 'python2-six'] + name: ['python2-fedfind', 'python2-fedmsg', 'python2-openqa_client'] state: absent when: "'python34-fedmsg' in group_names" tags: diff --git a/roles/openqa/dispatcher/tasks/main.yml b/roles/openqa/dispatcher/tasks/main.yml index b568c87ab4..a38acd3cd2 100644 --- a/roles/openqa/dispatcher/tasks/main.yml +++ b/roles/openqa/dispatcher/tasks/main.yml @@ -69,7 +69,7 @@ - name: Install required packages (Python 3) dnf: - name: ['python2-pip', 'python3-fedfind', 'python3-wikitcms', 'python3-fedmsg', + name: ['python3-fedfind', 'python3-wikitcms', 'python3-fedmsg', 'python3-openqa_client', 'python3-requests', 'python3-resultsdb_api', 'python3-resultsdb_conventions-fedora', 'python3-setuptools', 'python3-six'] state: present @@ -131,9 +131,17 @@ notify: - restart fedmsg-hub +- name: Install python2-pip if needed to remove py2 fedora_openqa + dnf: + name: python2-pip + state: present + when: "py2oqainstalled is defined and py2oqainstalled.files and 'python34-fedmsg' in group_names" + tags: + - packages + - name: Remove fedora_openqa (Python 2) command: "pip2 uninstall --disable-pip-version-check --yes fedora-openqa" - when: "py2oqainstalled is defined and py2oqainstalled and 'python34-fedmsg' in group_names" + when: "py2oqainstalled is defined and py2oqainstalled.files and 'python34-fedmsg' in group_names" notify: - restart fedmsg-hub @@ -141,15 +149,15 @@ command: "python3 setup.py install" args: chdir: /root/fedora_openqa - when: "(gittools is changed or not insttools.stat.exists or (py2oqainstalled is defined and py2oqainstalled)) and 'python34-fedmsg' in group_names" + when: "(gittools is changed or not insttools.stat.exists or (py2oqainstalled is defined and py2oqainstalled.files)) and 'python34-fedmsg' in group_names" notify: - restart fedmsg-hub - name: Remove Python 2 packages dnf: name: ['python2-fedfind', 'python2-wikitcms', 'python2-fedmsg', - 'python2-openqa_client', 'python2-requests', 'python2-resultsdb_api', - 'python2-resultsdb_conventions-fedora', 'python2-setuptools', 'python-six'] + 'python2-openqa_client', 'python2-resultsdb_api', + 'python2-resultsdb_conventions-fedora'] state: absent when: "'python34-fedmsg' in group_names" tags: diff --git a/roles/relvalconsumer/tasks/main.yml b/roles/relvalconsumer/tasks/main.yml index 0cab7cab38..d0602ef8f0 100644 --- a/roles/relvalconsumer/tasks/main.yml +++ b/roles/relvalconsumer/tasks/main.yml @@ -40,7 +40,7 @@ - name: Install required packages (Python 3) dnf: - name: ['python2-pip', 'python3-fedfind', 'python3-wikitcms', 'python3-fedmsg', + name: ['python3-fedfind', 'python3-wikitcms', 'python3-fedmsg', 'python3-mwclient', 'python3-setuptools', 'relval'] state: present when: "'python34-fedmsg' in group_names" @@ -111,9 +111,17 @@ notify: - restart fedmsg-hub +- name: Install python2-pip if needed to remove py2 relvalconsumer + dnf: + name: python2-pip + state: present + when: "py2rvinstalled is defined and py2rvinstalled.files and 'python34-fedmsg' in group_names" + tags: + - packages + - name: Remove relvalconsumer (Python 2) command: "pip2 uninstall --disable-pip-version-check --yes relvalconsumer" - when: "py2rvinstalled is defined and py2rvinstalled and 'python34-fedmsg' in group_names" + when: "py2rvinstalled is defined and py2rvinstalled.files and 'python34-fedmsg' in group_names" notify: - restart fedmsg-hub @@ -121,7 +129,7 @@ command: "python3 setup.py install" args: chdir: /root/relvalconsumer - when: "(gitrvc is changed or (py2rvinstalled is defined and py2rvinstalled)) and 'python34-fedmsg' in group_names" + when: "(gitrvc is changed or (py2rvinstalled is defined and py2rvinstalled.files)) and 'python34-fedmsg' in group_names" notify: - restart fedmsg-hub @@ -135,8 +143,7 @@ - name: Remove Python 2 packages dnf: - name: ['python2-fedfind', 'python2-wikitcms', 'python2-fedmsg', 'python2-mwclient', - 'python2-setuptools'] + name: ['python2-fedfind', 'python2-wikitcms', 'python2-fedmsg', 'python2-mwclient'] state: absent when: "'python34-fedmsg' in group_names" tags: