Browse Source

possibility to install pip packages added

Thomas Verchow 6 years ago
parent
commit
ee9bdd70cb
1 changed files with 20 additions and 13 deletions
  1. 20 13
      tasks/main.yml

+ 20 - 13
tasks/main.yml

@@ -64,21 +64,28 @@
         msg: "Installation failed!"
 
 
-- name: post task - set path to anaconda
-# ===============
+- name: post tasks
+# ================
   when: "anaconda_state == 'present' and anaconda_set_path|bool"
 
-  lineinfile:
-    dest: "{{ item }}"
-    create: true
-    state: present
-    insertafter: EOF
-    line: 'export PATH="{{ anaconda_install_dir }}/bin:$PATH"'
-  with_items:
-    - /etc/bash.bashrc.local
-    - /etc/ksh.kshrc.local
-    - /etc/zsh.zshrc.local
-    - /etc/ash.ashrc.local
+  block:
+  - name: post - set path to anaconda
+    lineinfile:
+      dest: "{{ item }}"
+      create: true
+      state: present
+      insertafter: EOF
+      line: 'export PATH="{{ anaconda_install_dir }}/bin:$PATH"'
+    with_items:
+      - /etc/bash.bashrc.local
+      - /etc/ksh.kshrc.local
+      - /etc/zsh.zshrc.local
+      - /etc/ash.ashrc.local
+  - name: post - install pip packages
+    pip:
+      name: "{{ anaconda_pip_packages }}"
+      state: latest
+      executable: /opt/anaconda/dist/bin/pip
 
 
 - name: uninstall