]> git.phdru.name Git - ansible.git/blobdiff - playbooks/debian/roles/init-system/tasks/python.yml
Feat(apt): Remove option `purge`
[ansible.git] / playbooks / debian / roles / init-system / tasks / python.yml
index 1adb841079e1e6974568611989221ff65e7e7aa0..e2667e165c30dc8a2190ea305fe99c523ec168d8 100644 (file)
@@ -4,14 +4,17 @@
     autoclean: yes
     autoremove: yes
     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']