From: Oleg Broytman Date: Tue, 6 Aug 2019 20:08:28 +0000 (+0300) Subject: Feat(init-system): Skip upgrading Python packages X-Git-Url: https://git.phdru.name/?p=ansible.git;a=commitdiff_plain;h=4ec49f791b6d1f1eb8cb4cb00475ebeb665cfda0 Feat(init-system): Skip upgrading Python packages Do not upgrade Python packages if python has already been installed. --- diff --git a/playbooks/debian/roles/init-system/tasks/python.yml b/playbooks/debian/roles/init-system/tasks/python.yml index cc25bff..584c4f4 100644 --- a/playbooks/debian/roles/init-system/tasks/python.yml +++ b/playbooks/debian/roles/init-system/tasks/python.yml @@ -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