1
0
mirror of https://git.decapod.one/brethil/dotfiles synced 2024-11-25 04:51:31 +01:00

ansible: add ipython startup dir cleanup, fix gitignore migration

This commit is contained in:
bretello 2024-08-12 23:41:40 +02:00
parent e1df82cff7
commit e32eb9fd10
Signed by: brethil
GPG Key ID: 876AAC6290170FE7

View File

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