vn-ansible/playbooks/print-facts.yaml

12 lines
313 B
YAML
Raw Normal View History

2024-09-23 14:32:28 +00:00
# https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_vars_facts.html
- hosts: all
gather_facts: yes
tasks:
- name: Print all available facts
ansible.builtin.debug:
var: ansible_facts
- name: Print variable value
debug:
msg: "Variable: {{ ansible_virtualization_type }}"