]> git.phdru.name Git - ansible.git/blob - playbooks/debian/roles/python-packages/tasks/main.yml
Feat(firewall): Use handler instead of condition
[ansible.git] / playbooks / debian / roles / python-packages / tasks / main.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            'python-gdbm', 'python-openssl', 'python3-openssl',
11           ]
12     state: latest
13     update_cache: yes
14   register: python
15
16 - name: Upgrade Python packages
17   become: true
18   shell: 'umask 022; {{ item }} -m pip install --upgrade
19       "pip < 19.1" setuptools tox virtualenv virtualenvwrapper "wheel < 0.31.1"
20       flake8 sphinx twine'
21   when: python.changed
22   loop: ['python3', 'python2']