]> git.phdru.name Git - ansible.git/blob - playbooks/debian/roles/init-system/tasks/python.yml
Feat(apt): Add option `cache_valid_time: 3600`
[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     cache_valid_time: 3600
7     install_recommends: no
8     name: ['python', 'python2.7', 'python3', 'python-pip', 'python3-pip',
9            'python-setuptools', 'python3-setuptools',
10           ]
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']