ansible_proxmox_vms/playbooks/facts.yml

16 lines
599 B
YAML

---
- 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\"] }}"