]> git.phdru.name Git - ansible.git/blobdiff - playbooks/debian/roles/init-system/tasks/python.yml
Feat(init-system): Skip upgrading Python packages
[ansible.git] / playbooks / debian / roles / init-system / tasks / python.yml
index 1adb841079e1e6974568611989221ff65e7e7aa0..584c4f4d25423717354f4c92cb833a737b5d9996 100644 (file)
@@ -4,10 +4,13 @@
     autoclean: yes
     autoremove: yes
     install_recommends: no
-    name: ['python', 'python2.7', 'python3', 'python-pip', 'python3-pip',]
+    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
@@ -15,3 +18,4 @@
       "pip < 19.1" setuptools tox virtualenv virtualenvwrapper "wheel < 0.31.1"
       flake8 sphinx twine'
   loop: ['python3', 'python2']
+  when: python.changed