fact plugin example?

Hi,
  Does anyone have an example of how to add a fact plugin? I can't seem to find one and before I sift the code to see how to do it - I figured it was worth asking for an example.

-sv

If you mean a fact module, see ansible-provisioning.

I don't know what a fact plugin is.

The setup module itself is probably the best example.

Just return an ansible_facts hash wrapping the key-value pairs you
would like to make available as variables.

Minimal example:

module.exit_json(dict(ansible_facts = dict(
    a = 1,
    b = [ 2 , 3, 4 ],
    c = dict(asdf=jkl, mnop=qrs)
)))