更新设备管理部署剧本
This commit is contained in:
25
roles/ipython/tasks/main.yml
Normal file
25
roles/ipython/tasks/main.yml
Normal file
@@ -0,0 +1,25 @@
|
||||
- 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/"
|
||||
dest: /tmp
|
||||
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/
|
||||
Reference in New Issue
Block a user