I have a custom fact as follows - /etc/ansible/facts.d/preference.fact [new facts] material = concrete structure = square
When this is not executable, it works, when it is executable it throws an error (shown below) 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} Trying to run a simple playbook to see if I can drill down into the specific facts. I can get it to work fine if I stop at -> debug: msg="Custom facts are {{ansible_local.preference}}" But I cannot seem to drill down any further. The error above will not throw when the fact is set to not executable, but will throw when the fact is executable.. Any ideas on those 2 items? 1) How to drill down into a fact 2) How to create the fact properly so that it doesnt throw an error? Maybe these are related. 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/3070eea1-2e84-4318-bbad-0441f0ff1652%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.