mirror of
https://github.com/saltstack/salt.git
synced 2025-04-16 09:40:20 +00:00
Show installer command in debug log
This commit is contained in:
parent
bd2c180753
commit
2e467c16e8
1 changed files with 5 additions and 0 deletions
|
@ -1770,6 +1770,8 @@ def install(name=None, refresh=False, pkgs=None, **kwargs):
|
|||
# Check Use Scheduler Option
|
||||
if pkginfo[version_num].get("use_scheduler", False):
|
||||
# Create Scheduled Task
|
||||
log.debug("PKG : cmd: %s /s /c %s", cmd_shell, arguments)
|
||||
log.debug("PKG : pwd: %s", cache_path)
|
||||
__salt__["task.create_task"](
|
||||
name="update-salt-software",
|
||||
user_name="System",
|
||||
|
@ -1827,6 +1829,8 @@ def install(name=None, refresh=False, pkgs=None, **kwargs):
|
|||
ret[pkg_name] = {"install status": "failed"}
|
||||
else:
|
||||
# Launch the command
|
||||
log.debug("PKG : cmd: %s /s /c %s", cmd_shell, arguments)
|
||||
log.debug("PKG : pwd: %s", cache_path)
|
||||
result = __salt__["cmd.run_all"](
|
||||
'"{}" /s /c "{}"'.format(cmd_shell, arguments),
|
||||
cache_path,
|
||||
|
@ -1834,6 +1838,7 @@ def install(name=None, refresh=False, pkgs=None, **kwargs):
|
|||
python_shell=False,
|
||||
redirect_stderr=True,
|
||||
)
|
||||
log.debug("PKG : retcode: %s", result["retcode"])
|
||||
if not result["retcode"]:
|
||||
ret[pkg_name] = {"install status": "success"}
|
||||
changed.append(pkg_name)
|
||||
|
|
Loading…
Add table
Reference in a new issue