ajout verification proxmox
This commit is contained in:
@@ -3,3 +3,7 @@ localhost ansible_connection=local ansible_python_interpreter=/usr/bin/python3
|
|||||||
|
|
||||||
[gitea_servers]
|
[gitea_servers]
|
||||||
gitea ansible_host=10.100.5.103 ansible_user=ansible ansible_python_interpreter=/usr/bin/python3
|
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
|
||||||
|
|||||||
41
playbooks/check-proxmox.yml
Normal file
41
playbooks/check-proxmox.yml
Normal file
@@ -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
|
||||||
Reference in New Issue
Block a user