Hi,
I’m newbie using Ansible (1.7.2) and try to write my first local fact using INI. According to Wikipedia (http://en.wikipedia.org/wiki/INI_file#Format), a INI file with only key-value pairs is a valid INI format.
Example:
foo=bar
So my local fact /etc/ansible/facts.d/test.fact has only key-value pairs. Calling ansible localhost -m setup -a “filter=ansible_local” returns following error
localhost | success >> {
“ansible_facts”: {
“ansible_local”: {
“test”: “error loading fact - please check content”
}
},
“changed”: false
}
My expectation is the following output
localhost | success >> {
“ansible_facts”: {
“ansible_local”: {
“test”: {
“foo”: “bar”
}
}
},
“changed”: false
}
When I add in my local fact a section like
[section]
foo=bar
then no error is thrown.
So my question is, is it a bug or a conscious decision for not supporting only key-value pairs or is the wikipedia article wrong?
Regards,
Sandra