Created a custom fact which only seems to work when not executable - etc/ansible/facts.d/preference.fact
[new facts] material = concrete structure = square When the preference.fact is set to executable I get the following error - TASK [Gathering Facts] ********************************************************* fatal: [localhost]: FAILED! => {"changed": false, "cmd": "/etc/ansible/facts.d/preference.fact", "failed": true, "msg": "[Errno 8] Exec format error", "rc": 8} Fixed that by setting the fact to not executable and the playbook runs fine My second question is how to drill into the fact to reference each fact separately if i need to ? I cant seem to drill in any further than - debug: msg="Custom facts are {{ansible_local.preference}} Playbook --- - hosts: localhost gather_facts: on tasks: - name: Display custom facts debug: msg="Custom facts are {{ansible_local.preference.new facts}}" -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/2e05e042-981b-4654-ab10-2cb1446013fa%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.