This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
zhangzhihan-device-manageme…/roles/ipython/tasks/main.yml

26 lines
850 B
YAML
Raw Normal View History

2020-05-08 18:19:47 +08:00
- name: "judge ipython status"
shell: locate /root/.ipython/profile_default/ipython_config.py
register: return
ignore_errors: true
- name: "copy Anaconda to destination server"
copy:
src: "{{ role_path }}/files/Anaconda3-2019.10-Linux-x86_64.sh"
dest: /tmp/Anaconda3-2019.10-Linux-x86_64.sh
2020-05-08 18:19:47 +08:00
when: return.rc != 0
- name: "install ipython"
shell: bash /tmp/Anaconda3-2019.10-Linux-x86_64.sh -b -p /root/anaconda
when: return.rc != 0
- name: "create ipython config"
shell: /root/anaconda/bin/ipython profile create
when: return.rc != 0
- name: "ncrease the ipython extension"
shell: cp -r /opt/tsg/cli/tsgextensions.py /root/.ipython/extensions/
when: return.rc != 0
- name: "Modify the configuration to automatically load the extension"
shell: cp /opt/tsg/cli/ipython_config.py /root/.ipython/profile_default/