--- /tmp/salt-3002.6+dfsg1-4+deb11u1ezq3obl2/debian/salt-doc_3002.6+dfsg1-4+deb11u1_all.deb +++ salt-doc_3002.6+dfsg1-4+deb11u1_all.deb ├── file list │ @@ -1,3 +1,3 @@ │ -rw-r--r-- 0 0 0 4 2021-11-18 21:09:03.000000 debian-binary │ --rw-r--r-- 0 0 0 84572 2021-11-18 21:09:03.000000 control.tar.xz │ --rw-r--r-- 0 0 0 10328660 2021-11-18 21:09:03.000000 data.tar.xz │ +-rw-r--r-- 0 0 0 84568 2021-11-18 21:09:03.000000 control.tar.xz │ +-rw-r--r-- 0 0 0 10328648 2021-11-18 21:09:03.000000 data.tar.xz ├── control.tar.xz │ ├── control.tar │ │ ├── ./md5sums │ │ │ ├── ./md5sums │ │ │ │┄ Files differ ├── data.tar.xz │ ├── data.tar │ │ ├── file list │ │ │ @@ -2264,15 +2264,15 @@ │ │ │ -rw-r--r-- 0 root (0) root (0) 55507 2021-11-18 21:09:03.000000 ./usr/share/doc/salt-doc/html/ref/modules/all/salt.modules.chocolatey.html │ │ │ -rw-r--r-- 0 root (0) root (0) 14724 2021-11-18 21:09:03.000000 ./usr/share/doc/salt-doc/html/ref/modules/all/salt.modules.chronos.html │ │ │ -rw-r--r-- 0 root (0) root (0) 18921 2021-11-18 21:09:03.000000 ./usr/share/doc/salt-doc/html/ref/modules/all/salt.modules.chroot.html │ │ │ -rw-r--r-- 0 root (0) root (0) 53091 2021-11-18 21:09:03.000000 ./usr/share/doc/salt-doc/html/ref/modules/all/salt.modules.cimc.html │ │ │ -rw-r--r-- 0 root (0) root (0) 41196 2021-11-18 21:09:03.000000 ./usr/share/doc/salt-doc/html/ref/modules/all/salt.modules.ciscoconfparse_mod.html │ │ │ -rw-r--r-- 0 root (0) root (0) 19274 2021-11-18 21:09:03.000000 ./usr/share/doc/salt-doc/html/ref/modules/all/salt.modules.cisconso.html │ │ │ -rw-r--r-- 0 root (0) root (0) 31594 2021-11-18 21:09:03.000000 ./usr/share/doc/salt-doc/html/ref/modules/all/salt.modules.cloud.html │ │ │ --rw-r--r-- 0 root (0) root (0) 222094 2021-11-18 21:09:03.000000 ./usr/share/doc/salt-doc/html/ref/modules/all/salt.modules.cmdmod.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 222118 2021-11-18 21:09:03.000000 ./usr/share/doc/salt-doc/html/ref/modules/all/salt.modules.cmdmod.html │ │ │ -rw-r--r-- 0 root (0) root (0) 22167 2021-11-18 21:09:03.000000 ./usr/share/doc/salt-doc/html/ref/modules/all/salt.modules.composer.html │ │ │ -rw-r--r-- 0 root (0) root (0) 32882 2021-11-18 21:09:03.000000 ./usr/share/doc/salt-doc/html/ref/modules/all/salt.modules.config.html │ │ │ -rw-r--r-- 0 root (0) root (0) 88823 2021-11-18 21:09:03.000000 ./usr/share/doc/salt-doc/html/ref/modules/all/salt.modules.consul.html │ │ │ -rw-r--r-- 0 root (0) root (0) 16964 2021-11-18 21:09:03.000000 ./usr/share/doc/salt-doc/html/ref/modules/all/salt.modules.container_resource.html │ │ │ -rw-r--r-- 0 root (0) root (0) 48477 2021-11-18 21:09:03.000000 ./usr/share/doc/salt-doc/html/ref/modules/all/salt.modules.cp.html │ │ │ -rw-r--r-- 0 root (0) root (0) 14779 2021-11-18 21:09:03.000000 ./usr/share/doc/salt-doc/html/ref/modules/all/salt.modules.cpan.html │ │ │ -rw-r--r-- 0 root (0) root (0) 25754 2021-11-18 21:09:03.000000 ./usr/share/doc/salt-doc/html/ref/modules/all/salt.modules.cron.html │ │ │ @@ -3872,15 +3872,15 @@ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2021-11-18 21:09:03.000000 ./usr/share/doc-base/ │ │ │ -rw-r--r-- 0 root (0) root (0) 320 2021-11-18 21:07:15.000000 ./usr/share/doc-base/salt-doc │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2021-11-18 21:09:03.000000 ./usr/share/lintian/ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2021-11-18 21:09:03.000000 ./usr/share/lintian/overrides/ │ │ │ -rw-r--r-- 0 root (0) root (0) 241 2021-11-18 21:07:15.000000 ./usr/share/lintian/overrides/salt-doc │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2021-11-18 21:09:03.000000 ./usr/share/man/ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2021-11-18 21:09:03.000000 ./usr/share/man/man7/ │ │ │ --rw-r--r-- 0 root (0) root (0) 3207841 2021-11-18 21:09:03.000000 ./usr/share/man/man7/salt.7.gz │ │ │ +-rw-r--r-- 0 root (0) root (0) 3207837 2021-11-18 21:09:03.000000 ./usr/share/man/man7/salt.7.gz │ │ │ lrwxrwxrwx 0 root (0) root (0) 0 2021-11-18 21:09:03.000000 ./usr/share/doc/salt/html -> ../salt-doc/html │ │ │ lrwxrwxrwx 0 root (0) root (0) 0 2021-11-18 21:09:03.000000 ./usr/share/doc/salt-doc/html/_static/doctools.js -> ../../../../javascript/sphinxdoc/1.0/doctools.js │ │ │ lrwxrwxrwx 0 root (0) root (0) 0 2021-11-18 21:09:03.000000 ./usr/share/doc/salt-doc/html/_static/jquery.js -> ../../../../javascript/sphinxdoc/1.0/jquery.js │ │ │ lrwxrwxrwx 0 root (0) root (0) 0 2021-11-18 21:09:03.000000 ./usr/share/doc/salt-doc/html/_static/js/vendor/bootstrap.min.js -> ../../../../../../javascript/bootstrap/js/bootstrap.min.js │ │ │ lrwxrwxrwx 0 root (0) root (0) 0 2021-11-18 21:09:03.000000 ./usr/share/doc/salt-doc/html/_static/js/vendor/modernizr-2.6.2-respond-1.1.0.min.js -> ../../../../../../javascript/modernizr/modernizr.min.js │ │ │ lrwxrwxrwx 0 root (0) root (0) 0 2021-11-18 21:09:03.000000 ./usr/share/doc/salt-doc/html/_static/language_data.js -> ../../../../javascript/sphinxdoc/1.0/language_data.js │ │ │ lrwxrwxrwx 0 root (0) root (0) 0 2021-11-18 21:09:03.000000 ./usr/share/doc/salt-doc/html/_static/searchtools.js -> ../../../../javascript/sphinxdoc/1.0/searchtools.js │ │ ├── ./usr/share/doc/salt-doc/html/ref/modules/all/salt.modules.cmdmod.html │ │ │ @@ -172,15 +172,15 @@ │ │ │
salt '*' cmd.has_exec cat
│ │ │  
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -salt.modules.cmdmod.powershell(cmd, cwd=None, stdin=None, runas=None, shell='/bin/sh', env=None, clean_env=False, template=None, rstrip=True, umask=None, output_encoding=None, output_loglevel='debug', hide_output=False, timeout=None, reset_system_locale=True, ignore_retcode=False, saltenv='base', use_vt=False, password=None, depth=None, encode_cmd=False, success_retcodes=None, **kwargs)
│ │ │ +salt.modules.cmdmod.powershell(cmd, cwd=None, stdin=None, runas=None, shell='/bin/bash', env=None, clean_env=False, template=None, rstrip=True, umask=None, output_encoding=None, output_loglevel='debug', hide_output=False, timeout=None, reset_system_locale=True, ignore_retcode=False, saltenv='base', use_vt=False, password=None, depth=None, encode_cmd=False, success_retcodes=None, **kwargs) │ │ │

Execute the passed PowerShell command and return the output as a dictionary.

│ │ │

Other cmd.* functions (besides cmd.powershell_all) │ │ │ return the raw text output of the command. This │ │ │ function appends | ConvertTo-JSON to the command and then parses the │ │ │ JSON into a Python dictionary. If you want the raw textual result of your │ │ │ PowerShell command you should use cmd.run with the shell=powershell │ │ │ option.

│ │ │ @@ -343,15 +343,15 @@ │ │ │
salt '*' cmd.powershell "$PSVersionTable.CLRVersion"
│ │ │  
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -salt.modules.cmdmod.powershell_all(cmd, cwd=None, stdin=None, runas=None, shell='/bin/sh', env=None, clean_env=False, template=None, rstrip=True, umask=None, output_encoding=None, output_loglevel='debug', quiet=False, timeout=None, reset_system_locale=True, ignore_retcode=False, saltenv='base', use_vt=False, password=None, depth=None, encode_cmd=False, force_list=False, success_retcodes=None, **kwargs)
│ │ │ +salt.modules.cmdmod.powershell_all(cmd, cwd=None, stdin=None, runas=None, shell='/bin/bash', env=None, clean_env=False, template=None, rstrip=True, umask=None, output_encoding=None, output_loglevel='debug', quiet=False, timeout=None, reset_system_locale=True, ignore_retcode=False, saltenv='base', use_vt=False, password=None, depth=None, encode_cmd=False, force_list=False, success_retcodes=None, **kwargs) │ │ │

Execute the passed PowerShell command and return a dictionary with a result │ │ │ field representing the output of the command, as well as other fields │ │ │ showing us what the PowerShell invocation wrote to stderr, the process │ │ │ id, and the exit code of the invocation.

│ │ │

This function appends | ConvertTo-JSON to the command before actually │ │ │ invoking powershell.

│ │ │

An unquoted empty string is not valid JSON, but it's very normal for the │ │ │ @@ -571,15 +571,15 @@ │ │ │

salt '*' cmd.powershell_all "dir mydirectory" force_list=True
│ │ │  
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -salt.modules.cmdmod.retcode(cmd, cwd=None, stdin=None, runas=None, group=None, shell='/bin/sh', python_shell=None, env=None, clean_env=False, template=None, umask=None, output_encoding=None, output_loglevel='debug', log_callback=None, timeout=None, reset_system_locale=True, ignore_retcode=False, saltenv='base', use_vt=False, password=None, success_retcodes=None, **kwargs)
│ │ │ +salt.modules.cmdmod.retcode(cmd, cwd=None, stdin=None, runas=None, group=None, shell='/bin/bash', python_shell=None, env=None, clean_env=False, template=None, umask=None, output_encoding=None, output_loglevel='debug', log_callback=None, timeout=None, reset_system_locale=True, ignore_retcode=False, saltenv='base', use_vt=False, password=None, success_retcodes=None, **kwargs) │ │ │

Execute a shell command and return the command's return code.

│ │ │
│ │ │
Parameters
│ │ │
    │ │ │
  • cmd (str) -- The command to run. ex: ls -lart /home

  • │ │ │
  • cwd (str) -- The directory from which to execute the command. Defaults │ │ │ to the home directory of the user specified by runas (or the user │ │ │ @@ -714,15 +714,15 @@ │ │ │

    salt '*' cmd.retcode "grep f" stdin='one\ntwo\nthree\nfour\nfive\n'
    │ │ │  
    │ │ │
    │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -salt.modules.cmdmod.run(cmd, cwd=None, stdin=None, runas=None, group=None, shell='/bin/sh', python_shell=None, env=None, clean_env=False, template=None, rstrip=True, umask=None, output_encoding=None, output_loglevel='debug', log_callback=None, hide_output=False, timeout=None, reset_system_locale=True, ignore_retcode=False, saltenv='base', use_vt=False, bg=False, password=None, encoded_cmd=False, raise_err=False, prepend_path=None, success_retcodes=None, **kwargs)
│ │ │ +salt.modules.cmdmod.run(cmd, cwd=None, stdin=None, runas=None, group=None, shell='/bin/bash', python_shell=None, env=None, clean_env=False, template=None, rstrip=True, umask=None, output_encoding=None, output_loglevel='debug', log_callback=None, hide_output=False, timeout=None, reset_system_locale=True, ignore_retcode=False, saltenv='base', use_vt=False, bg=False, password=None, encoded_cmd=False, raise_err=False, prepend_path=None, success_retcodes=None, **kwargs) │ │ │

Execute the passed command and return the output as a string

│ │ │
│ │ │
Parameters
│ │ │
    │ │ │
  • cmd (str) -- The command to run. ex: ls -lart /home

  • │ │ │
  • cwd (str) -- The directory from which to execute the command. Defaults │ │ │ to the home directory of the user specified by runas (or the user │ │ │ @@ -912,15 +912,15 @@ │ │ │

    salt '*' cmd.run cmd='sed -e s/=/:/g'
    │ │ │  
    │ │ │
    │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -salt.modules.cmdmod.run_all(cmd, cwd=None, stdin=None, runas=None, group=None, shell='/bin/sh', python_shell=None, env=None, clean_env=False, template=None, rstrip=True, umask=None, output_encoding=None, output_loglevel='debug', log_callback=None, hide_output=False, timeout=None, reset_system_locale=True, ignore_retcode=False, saltenv='base', use_vt=False, redirect_stderr=False, password=None, encoded_cmd=False, prepend_path=None, success_retcodes=None, **kwargs)
│ │ │ +salt.modules.cmdmod.run_all(cmd, cwd=None, stdin=None, runas=None, group=None, shell='/bin/bash', python_shell=None, env=None, clean_env=False, template=None, rstrip=True, umask=None, output_encoding=None, output_loglevel='debug', log_callback=None, hide_output=False, timeout=None, reset_system_locale=True, ignore_retcode=False, saltenv='base', use_vt=False, redirect_stderr=False, password=None, encoded_cmd=False, prepend_path=None, success_retcodes=None, **kwargs) │ │ │

Execute the passed command and return a dict of return data

│ │ │
│ │ │
Parameters
│ │ │
    │ │ │
  • cmd (str) -- The command to run. ex: ls -lart /home

  • │ │ │
  • cwd (str) -- The directory from which to execute the command. Defaults │ │ │ to the home directory of the user specified by runas (or the user │ │ │ @@ -1092,15 +1092,15 @@ │ │ │

    salt '*' cmd.run_all "grep f" stdin='one\ntwo\nthree\nfour\nfive\n'
    │ │ │  
    │ │ │
    │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -salt.modules.cmdmod.run_bg(cmd, cwd=None, runas=None, group=None, shell='/bin/sh', python_shell=None, env=None, clean_env=False, template=None, umask=None, timeout=None, output_encoding=None, output_loglevel='debug', log_callback=None, reset_system_locale=True, ignore_retcode=False, saltenv='base', password=None, prepend_path=None, success_retcodes=None, **kwargs)
│ │ │ +salt.modules.cmdmod.run_bg(cmd, cwd=None, runas=None, group=None, shell='/bin/bash', python_shell=None, env=None, clean_env=False, template=None, umask=None, timeout=None, output_encoding=None, output_loglevel='debug', log_callback=None, reset_system_locale=True, ignore_retcode=False, saltenv='base', password=None, prepend_path=None, success_retcodes=None, **kwargs) │ │ │

Execute the passed command in the background and return its PID

│ │ │
│ │ │

Note

│ │ │

If the init system is systemd and the backgrounded task should run even │ │ │ if the salt-minion process is restarted, prepend systemd-run │ │ │ --scope to the command. This will reparent the process in its own │ │ │ scope separate from salt-minion, and will not be affected by restarting │ │ │ @@ -1258,15 +1258,15 @@ │ │ │

salt '*' cmd.run_bg cmd='ls -lR / | sed -e s/=/:/g > /tmp/dontwait'
│ │ │  
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -salt.modules.cmdmod.run_chroot(root, cmd, cwd=None, stdin=None, runas=None, group=None, shell='/bin/sh', python_shell=True, binds=None, env=None, clean_env=False, template=None, rstrip=True, umask=None, output_encoding=None, output_loglevel='quiet', log_callback=None, hide_output=False, timeout=None, reset_system_locale=True, ignore_retcode=False, saltenv='base', use_vt=False, bg=False, success_retcodes=None, **kwargs)
│ │ │ +salt.modules.cmdmod.run_chroot(root, cmd, cwd=None, stdin=None, runas=None, group=None, shell='/bin/bash', python_shell=True, binds=None, env=None, clean_env=False, template=None, rstrip=True, umask=None, output_encoding=None, output_loglevel='quiet', log_callback=None, hide_output=False, timeout=None, reset_system_locale=True, ignore_retcode=False, saltenv='base', use_vt=False, bg=False, success_retcodes=None, **kwargs) │ │ │
│ │ │

New in version 2014.7.0.

│ │ │
│ │ │

This function runs cmd.run_all wrapped │ │ │ within a chroot, with dev and proc mounted in the chroot

│ │ │
│ │ │
Parameters
│ │ │ @@ -1386,15 +1386,15 @@ │ │ │
salt '*' cmd.run_chroot /var/lib/lxc/container_name/rootfs 'sh /tmp/bootstrap.sh'
│ │ │  
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -salt.modules.cmdmod.run_stderr(cmd, cwd=None, stdin=None, runas=None, group=None, shell='/bin/sh', python_shell=None, env=None, clean_env=False, template=None, rstrip=True, umask=None, output_encoding=None, output_loglevel='debug', log_callback=None, hide_output=False, timeout=None, reset_system_locale=True, ignore_retcode=False, saltenv='base', use_vt=False, password=None, prepend_path=None, success_retcodes=None, **kwargs)
│ │ │ +salt.modules.cmdmod.run_stderr(cmd, cwd=None, stdin=None, runas=None, group=None, shell='/bin/bash', python_shell=None, env=None, clean_env=False, template=None, rstrip=True, umask=None, output_encoding=None, output_loglevel='debug', log_callback=None, hide_output=False, timeout=None, reset_system_locale=True, ignore_retcode=False, saltenv='base', use_vt=False, password=None, prepend_path=None, success_retcodes=None, **kwargs) │ │ │

Execute a command and only return the standard error

│ │ │
│ │ │
Parameters
│ │ │
    │ │ │
  • cmd (str) -- The command to run. ex: ls -lart /home

  • │ │ │
  • cwd (str) -- The directory from which to execute the command. Defaults │ │ │ to the home directory of the user specified by runas (or the user │ │ │ @@ -1538,15 +1538,15 @@ │ │ │

    salt '*' cmd.run_stderr "grep f" stdin='one\ntwo\nthree\nfour\nfive\n'
    │ │ │  
    │ │ │
    │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -salt.modules.cmdmod.run_stdout(cmd, cwd=None, stdin=None, runas=None, group=None, shell='/bin/sh', python_shell=None, env=None, clean_env=False, template=None, rstrip=True, umask=None, output_encoding=None, output_loglevel='debug', log_callback=None, hide_output=False, timeout=None, reset_system_locale=True, ignore_retcode=False, saltenv='base', use_vt=False, password=None, prepend_path=None, success_retcodes=None, **kwargs)
│ │ │ +salt.modules.cmdmod.run_stdout(cmd, cwd=None, stdin=None, runas=None, group=None, shell='/bin/bash', python_shell=None, env=None, clean_env=False, template=None, rstrip=True, umask=None, output_encoding=None, output_loglevel='debug', log_callback=None, hide_output=False, timeout=None, reset_system_locale=True, ignore_retcode=False, saltenv='base', use_vt=False, password=None, prepend_path=None, success_retcodes=None, **kwargs) │ │ │

Execute a command, and only return the standard out

│ │ │
│ │ │
Parameters
│ │ │
    │ │ │
  • cmd (str) -- The command to run. ex: ls -lart /home

  • │ │ │
  • cwd (str) -- The directory from which to execute the command. Defaults │ │ │ to the home directory of the user specified by runas (or the user │ │ │ @@ -1690,15 +1690,15 @@ │ │ │

    salt '*' cmd.run_stdout "grep f" stdin='one\ntwo\nthree\nfour\nfive\n'
    │ │ │  
    │ │ │
    │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -salt.modules.cmdmod.script(source, args=None, cwd=None, stdin=None, runas=None, group=None, shell='/bin/sh', python_shell=None, env=None, template=None, umask=None, output_encoding=None, output_loglevel='debug', log_callback=None, hide_output=False, timeout=None, reset_system_locale=True, saltenv='base', use_vt=False, bg=False, password=None, success_retcodes=None, **kwargs)
│ │ │ +salt.modules.cmdmod.script(source, args=None, cwd=None, stdin=None, runas=None, group=None, shell='/bin/bash', python_shell=None, env=None, template=None, umask=None, output_encoding=None, output_loglevel='debug', log_callback=None, hide_output=False, timeout=None, reset_system_locale=True, saltenv='base', use_vt=False, bg=False, password=None, success_retcodes=None, **kwargs) │ │ │

Download a script from a remote location and execute the script locally. │ │ │ The script can be located on the salt master file server or on an HTTP/FTP │ │ │ server.

│ │ │

The script will be executed directly, so it can be written in any available │ │ │ programming language.

│ │ │
│ │ │
Parameters
│ │ │ @@ -1846,15 +1846,15 @@ │ │ │
salt '*' cmd.script salt://scripts/runme.sh stdin='one\ntwo\nthree\nfour\nfive\n'
│ │ │  
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -salt.modules.cmdmod.script_retcode(source, args=None, cwd=None, stdin=None, runas=None, group=None, shell='/bin/sh', python_shell=None, env=None, template='jinja', umask=None, timeout=None, reset_system_locale=True, saltenv='base', output_encoding=None, output_loglevel='debug', log_callback=None, use_vt=False, password=None, success_retcodes=None, **kwargs)
│ │ │ +salt.modules.cmdmod.script_retcode(source, args=None, cwd=None, stdin=None, runas=None, group=None, shell='/bin/bash', python_shell=None, env=None, template='jinja', umask=None, timeout=None, reset_system_locale=True, saltenv='base', output_encoding=None, output_loglevel='debug', log_callback=None, use_vt=False, password=None, success_retcodes=None, **kwargs) │ │ │

Download a script from a remote location and execute the script locally. │ │ │ The script can be located on the salt master file server or on an HTTP/FTP │ │ │ server.

│ │ │

The script will be executed directly, so it can be written in any available │ │ │ programming language.

│ │ │

The script can also be formatted as a template, the default is jinja.

│ │ │

Only evaluate the script return code and do not block for terminal output

│ │ │ @@ -1974,15 +1974,15 @@ │ │ │
salt '*' cmd.script_retcode salt://scripts/runme.sh stdin='one\ntwo\nthree\nfour\nfive\n'
│ │ │  
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -salt.modules.cmdmod.shell(cmd, cwd=None, stdin=None, runas=None, group=None, shell='/bin/sh', env=None, clean_env=False, template=None, rstrip=True, umask=None, output_encoding=None, output_loglevel='debug', log_callback=None, hide_output=False, timeout=None, reset_system_locale=True, ignore_retcode=False, saltenv='base', use_vt=False, bg=False, password=None, prepend_path=None, success_retcodes=None, **kwargs)
│ │ │ +salt.modules.cmdmod.shell(cmd, cwd=None, stdin=None, runas=None, group=None, shell='/bin/bash', env=None, clean_env=False, template=None, rstrip=True, umask=None, output_encoding=None, output_loglevel='debug', log_callback=None, hide_output=False, timeout=None, reset_system_locale=True, ignore_retcode=False, saltenv='base', use_vt=False, bg=False, password=None, prepend_path=None, success_retcodes=None, **kwargs) │ │ │

Execute the passed command and return the output as a string.

│ │ │
│ │ │

New in version 2015.5.0.

│ │ │
│ │ │
│ │ │
Parameters
│ │ │
    │ │ ├── ./usr/share/man/man7/salt.7.gz │ │ │ ├── salt.7 │ │ │ │ @@ -150535,15 +150535,15 @@ │ │ │ │ .ft P │ │ │ │ .fi │ │ │ │ .UNINDENT │ │ │ │ .UNINDENT │ │ │ │ .UNINDENT │ │ │ │ .INDENT 0.0 │ │ │ │ .TP │ │ │ │ -.B salt.modules.cmdmod.powershell(cmd, cwd=None, stdin=None, runas=None, shell=\(aq/bin/sh\(aq, env=None, clean_env=False, template=None, rstrip=True, umask=None, output_encoding=None, output_loglevel=\(aqdebug\(aq, hide_output=False, timeout=None, reset_system_locale=True, ignore_retcode=False, saltenv=\(aqbase\(aq, use_vt=False, password=None, depth=None, encode_cmd=False, success_retcodes=None, **kwargs) │ │ │ │ +.B salt.modules.cmdmod.powershell(cmd, cwd=None, stdin=None, runas=None, shell=\(aq/bin/bash\(aq, env=None, clean_env=False, template=None, rstrip=True, umask=None, output_encoding=None, output_loglevel=\(aqdebug\(aq, hide_output=False, timeout=None, reset_system_locale=True, ignore_retcode=False, saltenv=\(aqbase\(aq, use_vt=False, password=None, depth=None, encode_cmd=False, success_retcodes=None, **kwargs) │ │ │ │ Execute the passed PowerShell command and return the output as a dictionary. │ │ │ │ .sp │ │ │ │ Other \fBcmd.*\fP functions (besides \fBcmd.powershell_all\fP) │ │ │ │ return the raw text output of the command. This │ │ │ │ function appends \fB| ConvertTo\-JSON\fP to the command and then parses the │ │ │ │ JSON into a Python dictionary. If you want the raw textual result of your │ │ │ │ PowerShell command you should use \fBcmd.run\fP with the \fBshell=powershell\fP │ │ │ │ @@ -150787,15 +150787,15 @@ │ │ │ │ .ft P │ │ │ │ .fi │ │ │ │ .UNINDENT │ │ │ │ .UNINDENT │ │ │ │ .UNINDENT │ │ │ │ .INDENT 0.0 │ │ │ │ .TP │ │ │ │ -.B salt.modules.cmdmod.powershell_all(cmd, cwd=None, stdin=None, runas=None, shell=\(aq/bin/sh\(aq, env=None, clean_env=False, template=None, rstrip=True, umask=None, output_encoding=None, output_loglevel=\(aqdebug\(aq, quiet=False, timeout=None, reset_system_locale=True, ignore_retcode=False, saltenv=\(aqbase\(aq, use_vt=False, password=None, depth=None, encode_cmd=False, force_list=False, success_retcodes=None, **kwargs) │ │ │ │ +.B salt.modules.cmdmod.powershell_all(cmd, cwd=None, stdin=None, runas=None, shell=\(aq/bin/bash\(aq, env=None, clean_env=False, template=None, rstrip=True, umask=None, output_encoding=None, output_loglevel=\(aqdebug\(aq, quiet=False, timeout=None, reset_system_locale=True, ignore_retcode=False, saltenv=\(aqbase\(aq, use_vt=False, password=None, depth=None, encode_cmd=False, force_list=False, success_retcodes=None, **kwargs) │ │ │ │ Execute the passed PowerShell command and return a dictionary with a result │ │ │ │ field representing the output of the command, as well as other fields │ │ │ │ showing us what the PowerShell invocation wrote to \fBstderr\fP, the process │ │ │ │ id, and the exit code of the invocation. │ │ │ │ .sp │ │ │ │ This function appends \fB| ConvertTo\-JSON\fP to the command before actually │ │ │ │ invoking powershell. │ │ │ │ @@ -151117,15 +151117,15 @@ │ │ │ │ .ft P │ │ │ │ .fi │ │ │ │ .UNINDENT │ │ │ │ .UNINDENT │ │ │ │ .UNINDENT │ │ │ │ .INDENT 0.0 │ │ │ │ .TP │ │ │ │ -.B salt.modules.cmdmod.retcode(cmd, cwd=None, stdin=None, runas=None, group=None, shell=\(aq/bin/sh\(aq, python_shell=None, env=None, clean_env=False, template=None, umask=None, output_encoding=None, output_loglevel=\(aqdebug\(aq, log_callback=None, timeout=None, reset_system_locale=True, ignore_retcode=False, saltenv=\(aqbase\(aq, use_vt=False, password=None, success_retcodes=None, **kwargs) │ │ │ │ +.B salt.modules.cmdmod.retcode(cmd, cwd=None, stdin=None, runas=None, group=None, shell=\(aq/bin/bash\(aq, python_shell=None, env=None, clean_env=False, template=None, umask=None, output_encoding=None, output_loglevel=\(aqdebug\(aq, log_callback=None, timeout=None, reset_system_locale=True, ignore_retcode=False, saltenv=\(aqbase\(aq, use_vt=False, password=None, success_retcodes=None, **kwargs) │ │ │ │ Execute a shell command and return the command\(aqs return code. │ │ │ │ .INDENT 7.0 │ │ │ │ .TP │ │ │ │ .B Parameters │ │ │ │ .INDENT 7.0 │ │ │ │ .IP \(bu 2 │ │ │ │ \fBcmd\fP (\fI\%str\fP) \-\- The command to run. ex: \fBls \-lart /home\fP │ │ │ │ @@ -151343,15 +151343,15 @@ │ │ │ │ .ft P │ │ │ │ .fi │ │ │ │ .UNINDENT │ │ │ │ .UNINDENT │ │ │ │ .UNINDENT │ │ │ │ .INDENT 0.0 │ │ │ │ .TP │ │ │ │ -.B salt.modules.cmdmod.run(cmd, cwd=None, stdin=None, runas=None, group=None, shell=\(aq/bin/sh\(aq, python_shell=None, env=None, clean_env=False, template=None, rstrip=True, umask=None, output_encoding=None, output_loglevel=\(aqdebug\(aq, log_callback=None, hide_output=False, timeout=None, reset_system_locale=True, ignore_retcode=False, saltenv=\(aqbase\(aq, use_vt=False, bg=False, password=None, encoded_cmd=False, raise_err=False, prepend_path=None, success_retcodes=None, **kwargs) │ │ │ │ +.B salt.modules.cmdmod.run(cmd, cwd=None, stdin=None, runas=None, group=None, shell=\(aq/bin/bash\(aq, python_shell=None, env=None, clean_env=False, template=None, rstrip=True, umask=None, output_encoding=None, output_loglevel=\(aqdebug\(aq, log_callback=None, hide_output=False, timeout=None, reset_system_locale=True, ignore_retcode=False, saltenv=\(aqbase\(aq, use_vt=False, bg=False, password=None, encoded_cmd=False, raise_err=False, prepend_path=None, success_retcodes=None, **kwargs) │ │ │ │ Execute the passed command and return the output as a string │ │ │ │ .INDENT 7.0 │ │ │ │ .TP │ │ │ │ .B Parameters │ │ │ │ .INDENT 7.0 │ │ │ │ .IP \(bu 2 │ │ │ │ \fBcmd\fP (\fI\%str\fP) \-\- The command to run. ex: \fBls \-lart /home\fP │ │ │ │ @@ -151660,15 +151660,15 @@ │ │ │ │ .ft P │ │ │ │ .fi │ │ │ │ .UNINDENT │ │ │ │ .UNINDENT │ │ │ │ .UNINDENT │ │ │ │ .INDENT 0.0 │ │ │ │ .TP │ │ │ │ -.B salt.modules.cmdmod.run_all(cmd, cwd=None, stdin=None, runas=None, group=None, shell=\(aq/bin/sh\(aq, python_shell=None, env=None, clean_env=False, template=None, rstrip=True, umask=None, output_encoding=None, output_loglevel=\(aqdebug\(aq, log_callback=None, hide_output=False, timeout=None, reset_system_locale=True, ignore_retcode=False, saltenv=\(aqbase\(aq, use_vt=False, redirect_stderr=False, password=None, encoded_cmd=False, prepend_path=None, success_retcodes=None, **kwargs) │ │ │ │ +.B salt.modules.cmdmod.run_all(cmd, cwd=None, stdin=None, runas=None, group=None, shell=\(aq/bin/bash\(aq, python_shell=None, env=None, clean_env=False, template=None, rstrip=True, umask=None, output_encoding=None, output_loglevel=\(aqdebug\(aq, log_callback=None, hide_output=False, timeout=None, reset_system_locale=True, ignore_retcode=False, saltenv=\(aqbase\(aq, use_vt=False, redirect_stderr=False, password=None, encoded_cmd=False, prepend_path=None, success_retcodes=None, **kwargs) │ │ │ │ Execute the passed command and return a dict of return data │ │ │ │ .INDENT 7.0 │ │ │ │ .TP │ │ │ │ .B Parameters │ │ │ │ .INDENT 7.0 │ │ │ │ .IP \(bu 2 │ │ │ │ \fBcmd\fP (\fI\%str\fP) \-\- The command to run. ex: \fBls \-lart /home\fP │ │ │ │ @@ -151945,15 +151945,15 @@ │ │ │ │ .ft P │ │ │ │ .fi │ │ │ │ .UNINDENT │ │ │ │ .UNINDENT │ │ │ │ .UNINDENT │ │ │ │ .INDENT 0.0 │ │ │ │ .TP │ │ │ │ -.B salt.modules.cmdmod.run_bg(cmd, cwd=None, runas=None, group=None, shell=\(aq/bin/sh\(aq, python_shell=None, env=None, clean_env=False, template=None, umask=None, timeout=None, output_encoding=None, output_loglevel=\(aqdebug\(aq, log_callback=None, reset_system_locale=True, ignore_retcode=False, saltenv=\(aqbase\(aq, password=None, prepend_path=None, success_retcodes=None, **kwargs) │ │ │ │ +.B salt.modules.cmdmod.run_bg(cmd, cwd=None, runas=None, group=None, shell=\(aq/bin/bash\(aq, python_shell=None, env=None, clean_env=False, template=None, umask=None, timeout=None, output_encoding=None, output_loglevel=\(aqdebug\(aq, log_callback=None, reset_system_locale=True, ignore_retcode=False, saltenv=\(aqbase\(aq, password=None, prepend_path=None, success_retcodes=None, **kwargs) │ │ │ │ Execute the passed command in the background and return its PID │ │ │ │ .sp │ │ │ │ \fBNOTE:\fP │ │ │ │ .INDENT 7.0 │ │ │ │ .INDENT 3.5 │ │ │ │ If the init system is systemd and the backgrounded task should run even │ │ │ │ if the salt\-minion process is restarted, prepend \fBsystemd\-run │ │ │ │ @@ -152210,15 +152210,15 @@ │ │ │ │ .ft P │ │ │ │ .fi │ │ │ │ .UNINDENT │ │ │ │ .UNINDENT │ │ │ │ .UNINDENT │ │ │ │ .INDENT 0.0 │ │ │ │ .TP │ │ │ │ -.B salt.modules.cmdmod.run_chroot(root, cmd, cwd=None, stdin=None, runas=None, group=None, shell=\(aq/bin/sh\(aq, python_shell=True, binds=None, env=None, clean_env=False, template=None, rstrip=True, umask=None, output_encoding=None, output_loglevel=\(aqquiet\(aq, log_callback=None, hide_output=False, timeout=None, reset_system_locale=True, ignore_retcode=False, saltenv=\(aqbase\(aq, use_vt=False, bg=False, success_retcodes=None, **kwargs) │ │ │ │ +.B salt.modules.cmdmod.run_chroot(root, cmd, cwd=None, stdin=None, runas=None, group=None, shell=\(aq/bin/bash\(aq, python_shell=True, binds=None, env=None, clean_env=False, template=None, rstrip=True, umask=None, output_encoding=None, output_loglevel=\(aqquiet\(aq, log_callback=None, hide_output=False, timeout=None, reset_system_locale=True, ignore_retcode=False, saltenv=\(aqbase\(aq, use_vt=False, bg=False, success_retcodes=None, **kwargs) │ │ │ │ New in version 2014.7.0. │ │ │ │ │ │ │ │ .sp │ │ │ │ This function runs \fI\%cmd.run_all\fP wrapped │ │ │ │ within a chroot, with dev and proc mounted in the chroot │ │ │ │ .INDENT 7.0 │ │ │ │ .TP │ │ │ │ @@ -152400,15 +152400,15 @@ │ │ │ │ .ft P │ │ │ │ .fi │ │ │ │ .UNINDENT │ │ │ │ .UNINDENT │ │ │ │ .UNINDENT │ │ │ │ .INDENT 0.0 │ │ │ │ .TP │ │ │ │ -.B salt.modules.cmdmod.run_stderr(cmd, cwd=None, stdin=None, runas=None, group=None, shell=\(aq/bin/sh\(aq, python_shell=None, env=None, clean_env=False, template=None, rstrip=True, umask=None, output_encoding=None, output_loglevel=\(aqdebug\(aq, log_callback=None, hide_output=False, timeout=None, reset_system_locale=True, ignore_retcode=False, saltenv=\(aqbase\(aq, use_vt=False, password=None, prepend_path=None, success_retcodes=None, **kwargs) │ │ │ │ +.B salt.modules.cmdmod.run_stderr(cmd, cwd=None, stdin=None, runas=None, group=None, shell=\(aq/bin/bash\(aq, python_shell=None, env=None, clean_env=False, template=None, rstrip=True, umask=None, output_encoding=None, output_loglevel=\(aqdebug\(aq, log_callback=None, hide_output=False, timeout=None, reset_system_locale=True, ignore_retcode=False, saltenv=\(aqbase\(aq, use_vt=False, password=None, prepend_path=None, success_retcodes=None, **kwargs) │ │ │ │ Execute a command and only return the standard error │ │ │ │ .INDENT 7.0 │ │ │ │ .TP │ │ │ │ .B Parameters │ │ │ │ .INDENT 7.0 │ │ │ │ .IP \(bu 2 │ │ │ │ \fBcmd\fP (\fI\%str\fP) \-\- The command to run. ex: \fBls \-lart /home\fP │ │ │ │ @@ -152644,15 +152644,15 @@ │ │ │ │ .ft P │ │ │ │ .fi │ │ │ │ .UNINDENT │ │ │ │ .UNINDENT │ │ │ │ .UNINDENT │ │ │ │ .INDENT 0.0 │ │ │ │ .TP │ │ │ │ -.B salt.modules.cmdmod.run_stdout(cmd, cwd=None, stdin=None, runas=None, group=None, shell=\(aq/bin/sh\(aq, python_shell=None, env=None, clean_env=False, template=None, rstrip=True, umask=None, output_encoding=None, output_loglevel=\(aqdebug\(aq, log_callback=None, hide_output=False, timeout=None, reset_system_locale=True, ignore_retcode=False, saltenv=\(aqbase\(aq, use_vt=False, password=None, prepend_path=None, success_retcodes=None, **kwargs) │ │ │ │ +.B salt.modules.cmdmod.run_stdout(cmd, cwd=None, stdin=None, runas=None, group=None, shell=\(aq/bin/bash\(aq, python_shell=None, env=None, clean_env=False, template=None, rstrip=True, umask=None, output_encoding=None, output_loglevel=\(aqdebug\(aq, log_callback=None, hide_output=False, timeout=None, reset_system_locale=True, ignore_retcode=False, saltenv=\(aqbase\(aq, use_vt=False, password=None, prepend_path=None, success_retcodes=None, **kwargs) │ │ │ │ Execute a command, and only return the standard out │ │ │ │ .INDENT 7.0 │ │ │ │ .TP │ │ │ │ .B Parameters │ │ │ │ .INDENT 7.0 │ │ │ │ .IP \(bu 2 │ │ │ │ \fBcmd\fP (\fI\%str\fP) \-\- The command to run. ex: \fBls \-lart /home\fP │ │ │ │ @@ -152888,15 +152888,15 @@ │ │ │ │ .ft P │ │ │ │ .fi │ │ │ │ .UNINDENT │ │ │ │ .UNINDENT │ │ │ │ .UNINDENT │ │ │ │ .INDENT 0.0 │ │ │ │ .TP │ │ │ │ -.B salt.modules.cmdmod.script(source, args=None, cwd=None, stdin=None, runas=None, group=None, shell=\(aq/bin/sh\(aq, python_shell=None, env=None, template=None, umask=None, output_encoding=None, output_loglevel=\(aqdebug\(aq, log_callback=None, hide_output=False, timeout=None, reset_system_locale=True, saltenv=\(aqbase\(aq, use_vt=False, bg=False, password=None, success_retcodes=None, **kwargs) │ │ │ │ +.B salt.modules.cmdmod.script(source, args=None, cwd=None, stdin=None, runas=None, group=None, shell=\(aq/bin/bash\(aq, python_shell=None, env=None, template=None, umask=None, output_encoding=None, output_loglevel=\(aqdebug\(aq, log_callback=None, hide_output=False, timeout=None, reset_system_locale=True, saltenv=\(aqbase\(aq, use_vt=False, bg=False, password=None, success_retcodes=None, **kwargs) │ │ │ │ Download a script from a remote location and execute the script locally. │ │ │ │ The script can be located on the salt master file server or on an HTTP/FTP │ │ │ │ server. │ │ │ │ .sp │ │ │ │ The script will be executed directly, so it can be written in any available │ │ │ │ programming language. │ │ │ │ .INDENT 7.0 │ │ │ │ @@ -153132,15 +153132,15 @@ │ │ │ │ .ft P │ │ │ │ .fi │ │ │ │ .UNINDENT │ │ │ │ .UNINDENT │ │ │ │ .UNINDENT │ │ │ │ .INDENT 0.0 │ │ │ │ .TP │ │ │ │ -.B salt.modules.cmdmod.script_retcode(source, args=None, cwd=None, stdin=None, runas=None, group=None, shell=\(aq/bin/sh\(aq, python_shell=None, env=None, template=\(aqjinja\(aq, umask=None, timeout=None, reset_system_locale=True, saltenv=\(aqbase\(aq, output_encoding=None, output_loglevel=\(aqdebug\(aq, log_callback=None, use_vt=False, password=None, success_retcodes=None, **kwargs) │ │ │ │ +.B salt.modules.cmdmod.script_retcode(source, args=None, cwd=None, stdin=None, runas=None, group=None, shell=\(aq/bin/bash\(aq, python_shell=None, env=None, template=\(aqjinja\(aq, umask=None, timeout=None, reset_system_locale=True, saltenv=\(aqbase\(aq, output_encoding=None, output_loglevel=\(aqdebug\(aq, log_callback=None, use_vt=False, password=None, success_retcodes=None, **kwargs) │ │ │ │ Download a script from a remote location and execute the script locally. │ │ │ │ The script can be located on the salt master file server or on an HTTP/FTP │ │ │ │ server. │ │ │ │ .sp │ │ │ │ The script will be executed directly, so it can be written in any available │ │ │ │ programming language. │ │ │ │ .sp │ │ │ │ @@ -153324,15 +153324,15 @@ │ │ │ │ .ft P │ │ │ │ .fi │ │ │ │ .UNINDENT │ │ │ │ .UNINDENT │ │ │ │ .UNINDENT │ │ │ │ .INDENT 0.0 │ │ │ │ .TP │ │ │ │ -.B salt.modules.cmdmod.shell(cmd, cwd=None, stdin=None, runas=None, group=None, shell=\(aq/bin/sh\(aq, env=None, clean_env=False, template=None, rstrip=True, umask=None, output_encoding=None, output_loglevel=\(aqdebug\(aq, log_callback=None, hide_output=False, timeout=None, reset_system_locale=True, ignore_retcode=False, saltenv=\(aqbase\(aq, use_vt=False, bg=False, password=None, prepend_path=None, success_retcodes=None, **kwargs) │ │ │ │ +.B salt.modules.cmdmod.shell(cmd, cwd=None, stdin=None, runas=None, group=None, shell=\(aq/bin/bash\(aq, env=None, clean_env=False, template=None, rstrip=True, umask=None, output_encoding=None, output_loglevel=\(aqdebug\(aq, log_callback=None, hide_output=False, timeout=None, reset_system_locale=True, ignore_retcode=False, saltenv=\(aqbase\(aq, use_vt=False, bg=False, password=None, prepend_path=None, success_retcodes=None, **kwargs) │ │ │ │ Execute the passed command and return the output as a string. │ │ │ │ .sp │ │ │ │ New in version 2015.5.0. │ │ │ │ │ │ │ │ .INDENT 7.0 │ │ │ │ .TP │ │ │ │ .B Parameters