更新设备管理部署剧本

This commit is contained in:
zhangzhihan
2020-05-08 18:19:47 +08:00
parent 9a593538d3
commit e801af6ae3
41 changed files with 2143250 additions and 60 deletions

View 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/