facts
4 Ansible tutorials tagged “facts”. Working examples covering automation, configuration management, and DevOps workflows.
Ansible Facts — Gather System Info
playbooks · 7
Gather and use Ansible facts: print all facts with the setup module, filter OS, memory and network facts, use them in when and templates, and cache them.
Ansible Magic Variables Reference
playbooks · 4
Complete reference for Ansible magic variables — inventory_hostname, hostvars, groups, group_names, playbook_dir, role_path, and ansible_facts. Practical.
Generate Clean YAML Output from Ansible Facts
playbooks · 5
Discover how to generate clean YAML output from Ansible facts using Jinja2 templating, ensuring properly formatted data for easy reporting.
Ansible date_time — Timestamp Examples
playbooks · 6
Use the ansible_date_time fact in playbooks: iso8601, epoch and date keys, now() with strftime, timestamped file names, date math, and fixing undefined errors.