Compare commits
3 Commits
449af922ee
...
main
| Author | SHA256 | Date | |
|---|---|---|---|
| 012f6c8a95 | |||
| b5ad4b21cb | |||
| d00679880b |
@@ -26,12 +26,22 @@ dhcp ansible_host=192.168.1.5
|
|||||||
observatoire ansible_host=192.168.1.61
|
observatoire ansible_host=192.168.1.61
|
||||||
nginx ansible_host=192.168.1.201
|
nginx ansible_host=192.168.1.201
|
||||||
ncloud ansible_host=192.168.1.239
|
ncloud ansible_host=192.168.1.239
|
||||||
futurenuage ansible_host=192.168.1.168
|
futursenuage ansible_host=192.168.1.168
|
||||||
|
|
||||||
|
[matrix_server]
|
||||||
|
matrix ansible_host=192.168.1.87
|
||||||
|
synapse-admin ansible_host=synapse-admin.teyssier.lan
|
||||||
|
|
||||||
[vpn]
|
[vpn]
|
||||||
vypyhaine ansible_host=192.168.1.97
|
vypyhaine ansible_host=192.168.1.97
|
||||||
|
|
||||||
|
[automatisation]
|
||||||
|
ansible ansible_host=192.168.1.66 ansible_user=riesjack
|
||||||
|
|
||||||
[kubernetes]
|
[kubernetes]
|
||||||
k3s-master ansible_host=192.168.1.10
|
k3s-master ansible_host=192.168.1.10
|
||||||
k3s-worker-1 ansible_host=192.168.1.11
|
k3s-worker-1 ansible_host=192.168.1.11
|
||||||
k3s-worker-2 ansible_host=192.168.1.12
|
k3s-worker-2 ansible_host=192.168.1.12
|
||||||
|
|
||||||
|
[testing]
|
||||||
|
test ansible_host=test.teyssier.lan
|
||||||
|
|||||||
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
|
||||||
8
playbook/new_server.yml
Normal file
8
playbook/new_server.yml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
- name: Deploy necessary personal tools
|
||||||
|
hosts: all
|
||||||
|
roles:
|
||||||
|
- deploy_ssh_key
|
||||||
|
- deploy_root_ca
|
||||||
|
- deploy_nvim
|
||||||
|
- prometheus-agent
|
||||||
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