Linux server.edchosting.com 4.18.0-553.79.1.lve.el7h.x86_64 #1 SMP Wed Oct 15 16:34:46 UTC 2025 x86_64
LiteSpeed
Server IP : 75.98.162.185 & Your IP : 216.73.216.163
Domains :
Cant Read [ /etc/named.conf ]
User : goons4good
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
lib /
python3.6 /
site-packages /
salt /
output /
Delete
Unzip
Name
Size
Permission
Date
Action
__pycache__
[ DIR ]
drwxr-xr-x
2022-10-11 05:09
__init__.py
7.03
KB
-rw-r--r--
2022-05-16 09:16
dson.py
1.55
KB
-rw-r--r--
2022-05-16 09:16
highstate.py
21.64
KB
-rw-r--r--
2022-05-16 09:16
json_out.py
2.64
KB
-rw-r--r--
2022-05-16 09:16
key.py
3.01
KB
-rw-r--r--
2022-05-16 09:16
nested.py
5.27
KB
-rw-r--r--
2022-05-16 09:16
newline_values_only.py
2.11
KB
-rw-r--r--
2022-05-16 09:16
no_out_quiet.py
450
B
-rw-r--r--
2022-05-16 09:16
no_return.py
1.47
KB
-rw-r--r--
2022-05-16 09:16
overstatestage.py
1.01
KB
-rw-r--r--
2022-05-16 09:16
pony.py
2.58
KB
-rw-r--r--
2022-05-16 09:16
pprint_out.py
1010
B
-rw-r--r--
2022-05-16 09:16
profile.py
2.18
KB
-rw-r--r--
2022-05-16 09:16
progress.py
1.19
KB
-rw-r--r--
2022-05-16 09:16
raw.py
891
B
-rw-r--r--
2022-05-16 09:16
table_out.py
12.47
KB
-rw-r--r--
2022-05-16 09:16
txt.py
998
B
-rw-r--r--
2022-05-16 09:16
virt_query.py
1.84
KB
-rw-r--r--
2022-05-16 09:16
yaml_out.py
1.37
KB
-rw-r--r--
2022-05-16 09:16
Save
Rename
""" Display return data in JSON format ================================== :configuration: The output format can be configured in two ways: Using the ``--out-indent`` CLI flag and specifying a positive integer or a negative integer to group JSON from each minion to a single line. Or setting the ``output_indent`` setting in the Master or Minion configuration file with one of the following values: * ``Null``: put each minion return on a single line. * ``pretty``: use four-space indents and sort the keys. * An integer: specify the indentation level. Salt's outputters operate on a per-minion basis. Each minion return will be output as a single JSON object once it comes in to the master. Some JSON parsers can guess when an object ends and a new one begins but many can not. A good way to differentiate between each minion return is to use the single-line output format and to parse each line individually. Example output (truncated):: {"dave": {"en0": {"hwaddr": "02:b0:26:32:4c:69", ...}}} {"jerry": {"en0": {"hwaddr": "02:26:ab:0d:b9:0d", ...}}} {"kevin": {"en0": {"hwaddr": "02:6d:7f:ce:9f:ee", ...}}} {"mike": {"en0": {"hwaddr": "02:48:a2:4b:70:a0", ...}}} {"phill": {"en0": {"hwaddr": "02:1d:cc:a2:33:55", ...}}} {"stuart": {"en0": {"hwaddr": "02:9a:e0:ea:9e:3c", ...}}} CLI Example: .. code-block:: bash salt '*' foo.bar --out=json """ import logging import salt.utils.json log = logging.getLogger(__name__) # Define the module's virtual name __virtualname__ = "json" def __virtual__(): """ Rename to json """ return __virtualname__ def output(data, **kwargs): # pylint: disable=unused-argument """ Print the output data in JSON """ try: if "output_indent" not in __opts__: return salt.utils.json.dumps(data, default=repr, indent=4) indent = __opts__.get("output_indent") sort_keys = False if indent is None: indent = None elif indent == "pretty": indent = 4 sort_keys = True elif isinstance(indent, int): if indent < 0: indent = None return salt.utils.json.dumps( data, default=repr, indent=indent, sort_keys=sort_keys ) except UnicodeDecodeError as exc: log.error("Unable to serialize output to json") return salt.utils.json.dumps( {"error": "Unable to serialize output to json", "message": str(exc)} ) except TypeError: log.debug("An error occurred while outputting JSON", exc_info=True) # Return valid JSON for unserializable objects return salt.utils.json.dumps({})