mirror of
https://github.com/pigmonkey/spark.git
synced 2026-01-22 18:14:16 +00:00
Useful for seeing what Ansible knows about the system.
$ ansible-playbook -i localhost facts.yml
$ less /tmp/ansible_facts.json
10 lines
250 B
YAML
10 lines
250 B
YAML
---
|
|
- hosts: localhost
|
|
tasks:
|
|
- name: Print ansible_facts
|
|
debug:
|
|
var: ansible_facts
|
|
- name: Save ansible_facts to /tmp/ansible_facts.json
|
|
copy:
|
|
content: "{{ ansible_facts|to_nice_json }}"
|
|
dest: /tmp/ansible_facts.json
|