Initial Ansible inventory and playbooks

This commit is contained in:
vrubelroman 2026-06-01 23:09:25 +03:00
commit c642a36406
5 changed files with 49 additions and 0 deletions

16
facts.yml Normal file
View file

@ -0,0 +1,16 @@
---
- name: Show VM facts
hosts: proxmox_vms
gather_facts: true
tasks:
- name: Print important facts
ansible.builtin.debug:
msg:
- "Host: {{ inventory_hostname }}"
- "Hostname: {{ ansible_facts[\"hostname\"] }}"
- "OS family: {{ ansible_facts[\"os_family\"] }}"
- "Distribution: {{ ansible_facts[\"distribution\"] }}"
- "Distribution version: {{ ansible_facts[\"distribution_version\"] }}"
- "Package manager: {{ ansible_facts[\"pkg_mgr\"] }}"
- "Python: {{ ansible_facts[\"python\"][\"executable\"] }}"