From: Oleg Broytman Date: Tue, 6 Aug 2019 15:46:00 +0000 (+0300) Subject: Feat(init-system): Upgrade Python packages X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=9967bd2110b6ad89aff4226774fe1b14b3a33130;hp=9f636eea58602f38966c1258e2297c4cdbc6749d;p=ansible.git Feat(init-system): Upgrade Python packages --- diff --git a/playbooks/debian/roles/init-system/tasks/apt.yml b/playbooks/debian/roles/init-system/tasks/apt.yml index 83879f4..c73af40 100644 --- a/playbooks/debian/roles/init-system/tasks/apt.yml +++ b/playbooks/debian/roles/init-system/tasks/apt.yml @@ -29,7 +29,6 @@ 'fetchmail', 'gnupg', 'gnupg2', 'links2', 'logcheck', 'lzip', 'lzma', 'lzop', 'mc', 'mutt', 'p7zip', 'procmail', - 'python', 'python2.7', 'python3', 'python-pip', 'python3-pip', 'rsync', 'unzip', 'vim', 'wget', 'xz-utils', 'zip', ] purge: yes diff --git a/playbooks/debian/roles/init-system/tasks/main.yml b/playbooks/debian/roles/init-system/tasks/main.yml index 83104c7..ee33743 100644 --- a/playbooks/debian/roles/init-system/tasks/main.yml +++ b/playbooks/debian/roles/init-system/tasks/main.yml @@ -3,3 +3,6 @@ - name: locales import_tasks: locales.yml + +- name: Python + import_tasks: python.yml diff --git a/playbooks/debian/roles/init-system/tasks/python.yml b/playbooks/debian/roles/init-system/tasks/python.yml new file mode 100644 index 0000000..1adb841 --- /dev/null +++ b/playbooks/debian/roles/init-system/tasks/python.yml @@ -0,0 +1,17 @@ +- name: Install Python and packages + become: true + apt: + autoclean: yes + autoremove: yes + install_recommends: no + name: ['python', 'python2.7', 'python3', 'python-pip', 'python3-pip',] + purge: yes + state: latest + update_cache: yes + +- name: Upgrade Python packages + become: true + shell: 'umask 022; {{ item }} -m pip install --upgrade + "pip < 19.1" setuptools tox virtualenv virtualenvwrapper "wheel < 0.31.1" + flake8 sphinx twine' + loop: ['python3', 'python2']