I know I can use the command below to save all ansible facts to a file:
ansible all -m setup --tree facts.d/
But I want to do this within a playbook. Currently I have:
- name: Collect facts
setup:
fact_path: facts.d
But nothing is collected when I run the task. Am I missing something?