]> git.phdru.name Git - ansible.git/commitdiff
Feat(init-system): Upgrade Python packages
authorOleg Broytman <phd@phdru.name>
Tue, 6 Aug 2019 15:46:00 +0000 (18:46 +0300)
committerOleg Broytman <phd@phdru.name>
Tue, 6 Aug 2019 19:19:13 +0000 (22:19 +0300)
playbooks/debian/roles/init-system/tasks/apt.yml
playbooks/debian/roles/init-system/tasks/main.yml
playbooks/debian/roles/init-system/tasks/python.yml [new file with mode: 0644]

index 83879f4ab68a4c07699df939a226fa301a5b4fa8..c73af40298c5bd1378a113ed7c35c6532b7ac01c 100644 (file)
@@ -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
index 83104c73bd0a06ca8c7d748ff712484b579fa1be..ee3374351623a3deec321bdb9f3134ed68ef65f4 100644 (file)
@@ -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 (file)
index 0000000..1adb841
--- /dev/null
@@ -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']