From 0a983597763985ead07bfcbfbc56b74381501ddc Mon Sep 17 00:00:00 2001 From: Megan Wilhite Date: Fri, 21 Jul 2023 12:51:45 -0600 Subject: [PATCH] Add documentation for external pillar cmd json --- salt/pillar/cmd_json.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/salt/pillar/cmd_json.py b/salt/pillar/cmd_json.py index 11101dbeb7c..50fbdee27f4 100644 --- a/salt/pillar/cmd_json.py +++ b/salt/pillar/cmd_json.py @@ -1,5 +1,23 @@ """ Execute a command and read the output as JSON. The JSON data is then directly overlaid onto the minion's Pillar data. + + +Configuring the CMD_JSON ext_pillar +==================================== + +Set the following Salt config to setup cmd json result as external pillar source: + +.. code-block:: yaml + + ext_pillar: + - cmd_json: 'echo {\"arg\":\"value\"}' + +This will run the command ``echo {arg: value}`` on the master. + + +Module Documentation +==================== + """ import logging