From bd787b32e5461d18e0db75d7ef0dce44b810ae8f Mon Sep 17 00:00:00 2001 From: Thomas MALGOUYRES Date: Tue, 7 Jul 2026 19:30:05 +0000 Subject: [PATCH] ajout verification proxmox --- inventory/hosts.ini | 4 ++++ playbooks/check-proxmox.yml | 41 +++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 playbooks/check-proxmox.yml diff --git a/inventory/hosts.ini b/inventory/hosts.ini index a092447..67ad2e0 100644 --- a/inventory/hosts.ini +++ b/inventory/hosts.ini @@ -3,3 +3,7 @@ localhost ansible_connection=local ansible_python_interpreter=/usr/bin/python3 [gitea_servers] gitea ansible_host=10.100.5.103 ansible_user=ansible ansible_python_interpreter=/usr/bin/python3 + +[proxmox_nodes] +pve01 ansible_host=10.100.5.250 ansible_user=root ansible_python_interpreter=/usr/bin/python3 +pve02 ansible_host=10.100.5.251 ansible_user=root ansible_python_interpreter=/usr/bin/python3 diff --git a/playbooks/check-proxmox.yml b/playbooks/check-proxmox.yml new file mode 100644 index 0000000..f5eb359 --- /dev/null +++ b/playbooks/check-proxmox.yml @@ -0,0 +1,41 @@ +- name: Verifier les noeuds Proxmox + hosts: proxmox_nodes + become: false + gather_facts: true + + tasks: + - name: Afficher le hostname + command: hostname + register: hostname_result + changed_when: false + + - name: Resultat hostname + debug: + var: hostname_result.stdout + + - name: Verifier la version Proxmox + command: pveversion + register: pve_version + changed_when: false + + - name: Resultat version Proxmox + debug: + var: pve_version.stdout + + - name: Lister les conteneurs LXC + command: pct list + register: pct_list + changed_when: false + + - name: Resultat conteneurs LXC + debug: + var: pct_list.stdout_lines + + - name: Lister les VM QEMU + command: qm list + register: qm_list + changed_when: false + + - name: Resultat VM + debug: + var: qm_list.stdout_lines