From e32eb9fd1077288bfb334d4bed1d8c7ecc35bc7c Mon Sep 17 00:00:00 2001 From: bretello Date: Mon, 12 Aug 2024 23:41:40 +0200 Subject: [PATCH] ansible: add ipython startup dir cleanup, fix gitignore migration --- ansible/dotfiles/tasks/main.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/ansible/dotfiles/tasks/main.yml b/ansible/dotfiles/tasks/main.yml index 19985e1..8f86114 100644 --- a/ansible/dotfiles/tasks/main.yml +++ b/ansible/dotfiles/tasks/main.yml @@ -98,12 +98,22 @@ ServerAliveInterval 300 create: true +- name: Check ipython startup dir + stat: path=${HOME}/.ipython/profile_default/startup + register: ipython_startup + +- name: ipython startup cleanup + shell: | + # ipython creates a a startup dir with a README, we can move that away + mv "$HOME/.ipython/profile_default/startup" "$HOME/.ipython/profile_default/startup.ansiblebak" + when: ipython_startup.stat.islnk is defined and ipython_startup.stat.islnk == False + - name: dotfiles symlinks file: src: "{{ dotfiles_path }}/{{ item.key }}" dest: "{{ item.value }}" state: link - force: yes + force: true loop: "{{ files | dict2items }}" vars: files: @@ -150,6 +160,6 @@ set -eu mkdir -p ${HOME}/.config/git - ln -s {{ dotfiles_path }}/gitignore ${HOME}/.config/git/ignore - rm -f ~/.gitignore + ln -sf {{ dotfiles_path }}/gitignore ${HOME}/.config/git/ignore + rm -f $HOME/.gitignore when: gitignore.stat.exists