--- /dev/null
+- name: Install Python and packages
+ become: true
+ dnf:
+ name: ['python2', 'python3', 'python2-pip', 'python3-pip',
+ 'python2-setuptools', 'python3-setuptools',
+ ]
+ state: latest
+ update_cache: yes
+ register: python
+
+- name: Upgrade Python packages
+ become: true
+ shell: 'umask 022; {{ item }} -m pip install --upgrade
+ "pip < 19.1" setuptools tox virtualenv virtualenvwrapper "wheel < 0.31.1"
+ flake8 sphinx twine'
+ when: python.changed
+ loop: ['python3', 'python2']