]> git.phdru.name Git - ansible.git/commitdiff
Feat(init-system): Skip upgrading Python packages
authorOleg Broytman <phd@phdru.name>
Tue, 6 Aug 2019 20:08:28 +0000 (23:08 +0300)
committerOleg Broytman <phd@phdru.name>
Tue, 6 Aug 2019 20:08:28 +0000 (23:08 +0300)
Do not upgrade Python packages if python has already been installed.

playbooks/debian/roles/init-system/tasks/python.yml

index cc25bffb41fc889a822a472e17859201349bc2c3..584c4f4d25423717354f4c92cb833a737b5d9996 100644 (file)
@@ -10,6 +10,7 @@
     purge: yes
     state: latest
     update_cache: yes
+  register: python
 
 - name: Upgrade Python packages
   become: true
@@ -17,3 +18,4 @@
       "pip < 19.1" setuptools tox virtualenv virtualenvwrapper "wheel < 0.31.1"
       flake8 sphinx twine'
   loop: ['python3', 'python2']
+  when: python.changed