Update debian setup

This commit is contained in:
sonny 2024-08-10 16:45:02 +02:00
parent deec1581c5
commit 8f273cc775
3 changed files with 17 additions and 17 deletions

View file

@ -14,8 +14,6 @@
user: '{{ ansible_user_id }}'
items:
- { domain: '{{ gitlab_domain }}', key: '{{ gitlab_host_key }}' }
roles:
- common
tasks:
- import_tasks: 'tasks/dotfiles.yml'
- import_tasks: 'tasks/neovim.yml'

View file

@ -150,14 +150,23 @@
}
- block:
- name: register the current version
- name: create neovim install directory
become: true
file:
state: directory
path: '{{ neovim.install_path }}'
owner: '{{ ansible_user_id }}'
group: '{{ ansible_user_gid }}'
- name: register the current neovim version
command:
argv:
- '{{ neovim.install_path }}/bin/nvim'
- '--version'
register: neovim_stats
ignore_errors: true
- name: parse the current version
- name: parse the current neovim version
set_fact:
neovim_installed_version: neovim_stats.stdout_lines[0] | regex_search('(v\d+\.\d+\.\d+)')
when: neovim_stats.rc == 0
@ -176,17 +185,10 @@
extra_opts:
- '--strip-components=1'
- '--show-stored-names'
when: neovim_download.rc == 0
- '--overwrite'
when: neovim_download.state == 'file' and
(neovim_installed_version is undefined or neovim_installed_version != neovim.version)
- name: set updated PATH variable
set_fact:
neovim_new_path: '{{ neovim.install_path }}/bin'
- name: Update PATH to include {{ neovim_new_path }}
ansible.builtin.replace:
path: '~/.profile'
regexp: '^PATH="{{ ansible_env.PATH }}"'
replace: 'PATH="{{ ansible_env.PATH }}:{{ neovim_new_path }}"'
when: neovim_new_path not in ansible_env.PATH
# TODO: add new entry to PATH
when: ansible_facts['os_family'] == 'Debian'

View file

@ -1,12 +1,12 @@
ansible_connection: local
ansible_python_interpreter: '/usr/bin/env python'
ansible_python_interpreter: '/usr/bin/python3'
packages:
- python3
- git
- vim
- npm
- tree-sitter
- libtree-sitter0
- ripgrep
neovim: