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