New config to deploy RootCA certif and NeoVim install + config (with gitea link)
This commit is contained in:
13
playbook/deploy_nvim.yml
Normal file
13
playbook/deploy_nvim.yml
Normal file
@@ -0,0 +1,13 @@
|
||||
---
|
||||
- name: Deploy and config
|
||||
gather_facts: true
|
||||
hosts: all
|
||||
roles:
|
||||
- deploy_nvim
|
||||
vars:
|
||||
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 }}"
|
||||
|
||||
|
||||
6
playbook/deploy_root_ca.yml
Normal file
6
playbook/deploy_root_ca.yml
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
- name: Deploy and config
|
||||
gather_facts: true
|
||||
hosts: all
|
||||
roles:
|
||||
- deploy_root_ca
|
||||
62
roles/deploy_nvim/tasks/main.yml
Normal file
62
roles/deploy_nvim/tasks/main.yml
Normal 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] }}"
|
||||
6
roles/deploy_nvim/vars/main.yml
Normal file
6
roles/deploy_nvim/vars/main.yml
Normal 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 }}"
|
||||
|
||||
|
||||
15
roles/deploy_root_ca/tasks/main.yml
Normal file
15
roles/deploy_root_ca/tasks/main.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
---
|
||||
- name: Make sure the folder exists
|
||||
file:
|
||||
path: /usr/local/share/ca-certificates
|
||||
state: directory
|
||||
|
||||
- name: Copy the certificate (Debian, Ubuntu)
|
||||
copy:
|
||||
src: "/home/riesjack/ansible/roles/deploy_root_ca/template/root_ca_teyssier-lan.crt"
|
||||
dest: "/usr/local/share/ca-certificates/root_ca_teyssier-lan.crt"
|
||||
register: result
|
||||
|
||||
- name: Update CA Trust (Debian, Ubuntu)
|
||||
command: update-ca-certificates
|
||||
when: result is changed
|
||||
12
roles/deploy_root_ca/template/root_ca_teyssier-lan.crt
Normal file
12
roles/deploy_root_ca/template/root_ca_teyssier-lan.crt
Normal file
@@ -0,0 +1,12 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIBtzCCAV6gAwIBAgIRANuBmXvozSr/3UZhmBRBgb0wCgYIKoZIzj0EAwIwOjEX
|
||||
MBUGA1UEChMOTVRFLUhvbWVMYWItQ0ExHzAdBgNVBAMTFk1URS1Ib21lTGFiLUNB
|
||||
IFJvb3QgQ0EwHhcNMjYwMjE5MjMyOTMwWhcNMzYwMjE3MjMyOTMwWjA6MRcwFQYD
|
||||
VQQKEw5NVEUtSG9tZUxhYi1DQTEfMB0GA1UEAxMWTVRFLUhvbWVMYWItQ0EgUm9v
|
||||
dCBDQTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABFiah3HIaLfJ6Bj/bs4nA21K
|
||||
w0oaNgjaxF0XKvRgNX4nWj7lzWRM5RvqtuZuX4l1KcfFq8GP9MCdKM9qsihe+1qj
|
||||
RTBDMA4GA1UdDwEB/wQEAwIBBjASBgNVHRMBAf8ECDAGAQH/AgEBMB0GA1UdDgQW
|
||||
BBTdprIba2EdXlvq7y0EIcGmBVC7LjAKBggqhkjOPQQDAgNHADBEAiAw1BtCe/Dv
|
||||
73SIhXvDeeDxmLu0VtLSzvEIRLhXW2OgsQIgA0e4OCvHg1m/dqJLEGvkyLezvFRR
|
||||
196Ykc61ugWh6cU=
|
||||
-----END CERTIFICATE-----
|
||||
Reference in New Issue
Block a user