Fix Py2 install detection and trim py2 package removals
Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
parent
f7dcf020fb
commit
56d689d31a
4 changed files with 47 additions and 17 deletions
|
@ -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:
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue