Quellcode durchsuchen

possibility to install pip packages added

Thomas Verchow vor 7 Jahren
Ursprung
Commit
ee9bdd70cb
1 geänderte Dateien mit 20 neuen und 13 gelöschten Zeilen
  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