Loop over old neovim stow directories

This commit is contained in:
2025-07-01 12:56:14 +01:00
parent b47d77b671
commit 928f9b2cfc
2 changed files with 24 additions and 19 deletions

View File

@@ -0,0 +1,19 @@
---
- name: check if {{item}} exists
stat:
path: '{{item}}'
register: old_package
- name: uninstall package from {{item}}
when: old_package.stat.exists
become: true
command:
cmd: 'stow --delete --target /usr/local .'
chdir: '{{item}}'
- name: remove {{item}}
when: old_package.stat.exists
become: true
file:
state: absent
path: '{{item}}'