From 9967bd2110b6ad89aff4226774fe1b14b3a33130 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Tue, 6 Aug 2019 18:46:00 +0300 Subject: [PATCH] Feat(init-system): Upgrade Python packages --- .../debian/roles/init-system/tasks/apt.yml | 1 - .../debian/roles/init-system/tasks/main.yml | 3 +++ .../debian/roles/init-system/tasks/python.yml | 17 +++++++++++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 playbooks/debian/roles/init-system/tasks/python.yml 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'] -- 2.39.5