--- - name: gather_facts hosts: all gather_facts: 'true' tasks: - name: Gather facts ansible.builtin.setup: register: ansible_facts_setup - local_action: module: ansible.builtin.copy content: "{{ ansible_facts_setup }}" dest: "/var/lib/awx/projects/server_inventory/output/{{ inventory_hostname }}"