Ansible - Want Json Module Type


Json (or Want Json) is a Module type.

A non-native module accepts a filename as its only command line parameter. Ansible creates this file with the module parameters and pass it to the module.

Process / Dev

The non-native module needs to:

  • open the file, (ie a JSON temporary file containing the module’s parameters)
  • read and parse the parameters,
  • operate on the data,
  • and print its return data as a JSON encoded dictionary to stdout before exiting.

These types of modules are self-contained entities. As of Ansible 2.1, Ansible only modifies them to change a shebang line if present.


Documentation / Reference

Powered by ComboStrap