X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=playbooks%2Fdebian%2Froles%2Finit-system%2Ftasks%2Fpython.yml;h=ead9aa5ee235fe4bd64b104eaf1c254296939152;hb=d5ce40f24315402f3acd3e099cc48dc8f774d356;hp=1adb841079e1e6974568611989221ff65e7e7aa0;hpb=9967bd2110b6ad89aff4226774fe1b14b3a33130;p=ansible.git diff --git a/playbooks/debian/roles/init-system/tasks/python.yml b/playbooks/debian/roles/init-system/tasks/python.yml index 1adb841..ead9aa5 100644 --- a/playbooks/debian/roles/init-system/tasks/python.yml +++ b/playbooks/debian/roles/init-system/tasks/python.yml @@ -3,15 +3,19 @@ apt: autoclean: yes autoremove: yes + cache_valid_time: 3600 install_recommends: no - name: ['python', 'python2.7', 'python3', 'python-pip', 'python3-pip',] - purge: yes + name: ['python', 'python2.7', 'python3', 'python-pip', 'python3-pip', + 'python-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']