apt:
autoclean: yes
autoremove: yes
+ cache_valid_time: 3600
install_recommends: no
name: ['python', 'python2.7', 'python3', 'python-pip', 'python3-pip',
'python-setuptools', 'python3-setuptools',
]
- purge: yes
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']