]> git.phdru.name Git - ansible.git/blob - playbooks/debian/roles/init-system/tasks/python.yml
447cb423986a8845ef714cddb69b95603456a257
[ansible.git] / playbooks / debian / roles / init-system / tasks / python.yml
1 - name: Install Python and packages
2   become: true
3   apt:
4     autoclean: yes
5     autoremove: yes
6     install_recommends: no
7     name: ['python', 'python2.7', 'python3', 'python-pip', 'python3-pip',
8            'python-setuptools', 'python3-setuptools',
9           ]
10     purge: yes
11     state: latest
12     update_cache: yes
13   register: python
14
15 - name: Upgrade Python packages
16   become: true
17   shell: 'umask 022; {{ item }} -m pip install --upgrade
18       "pip < 19.1" setuptools tox virtualenv virtualenvwrapper "wheel < 0.31.1"
19       flake8 sphinx twine'
20   when: python.changed
21   loop: ['python3', 'python2']