New config to deploy RootCA certif and NeoVim install + config (with gitea link)

This commit is contained in:
2026-03-08 22:39:22 +00:00
parent 449af922ee
commit d00679880b
6 changed files with 114 additions and 0 deletions

View File

@@ -0,0 +1,62 @@
---
- name: Install system dependencies (Ubuntu/Debian)
become: true
apt:
name:
- git
- curl
- build-essential # Pour Treesitter (gcc/make)
- unzip
- python3-pip
- nodejs # Pour certains serveurs LSP (Pyright, etc.)
- npm
- ripgrep # Pour Telescope
- fd-find # Pour Telescope
state: present
update_cache: yes
- name: Download Neovim Binary via Curl (Bypass get_url SSL bug)
become: true
command: >
curl -L -o /tmp/nvim.tar.gz
https://github.com/neovim/neovim/releases/download/{{ nvim_version }}/nvim-linux-x86_64.tar.gz
args:
creates: "/tmp/nvim.tar.gz" # Ne télécharge pas si déjà présent
- name: Extract Neovim
become: true
unarchive:
src: "/tmp/nvim.tar.gz"
dest: "/opt"
remote_src: yes
- name: Create symbolic link to /usr/local/bin
become: true
file:
src: "/opt/nvim-linux-x86_64/bin/nvim"
dest: "/usr/local/bin/nvim"
state: link
- name: Ensure .config directory exists
file:
path: "{{ user_home }}/.config/nvim"
state: directory
owner: "{{ user_name }}"
mode: '0755'
become: no
- name: Clone Neovim Configuration from Git
git:
repo: "{{ nvim_config_repo }}"
dest: "{{ user_home }}/.config/nvim"
force: yes
become: no
- name: Final check - Neovim version
command: nvim --version
register: nvim_check
changed_when: false
- debug:
msg: "Neovim installé avec succès : {{ nvim_check.stdout_lines[0] }}"

View File

@@ -0,0 +1,6 @@
nvim_config_repo: "https://versionning.teyssier.lan/mteyssier/nvim.git"
nvim_version: "v0.11.6" # Ou "nightly"
user_name: "{{ ansible_user_id }}"
user_home: "{{ ansible_env.HOME }}"