Skip to content
This repository has been archived by the owner on Mar 24, 2022. It is now read-only.

IIS configuration fails #124

Open
yzach opened this issue Jun 10, 2015 · 4 comments
Open

IIS configuration fails #124

yzach opened this issue Jun 10, 2015 · 4 comments

Comments

@yzach
Copy link
Contributor

yzach commented Jun 10, 2015

I am trying to configure IIS on Windows 2012R2 x64 via salt. I downloaded and linked salt-contrib. Now when I run:

salt-call --local iis.apppool_list

I am getting the following error

[Error 2] The system cannot find the file specified

But when I am running

salt-call --local cmd.run "C:\Windows\system32\inetsrv\appcmd.exe list APPPOOL"

It displays the configured apppools.

@jfindlay
Copy link
Contributor

@yzach, is it possible for you to provide more log information? There should be a log statement like Executing command <cmd> ....

@yzach
Copy link
Contributor Author

yzach commented Jun 11, 2015

@jfindlay Please see below

[INFO ] Executing command '"C:\Windows\System32\inetsrv\appcmd.exe" list APPPOOL' in directory 'C:\Users\yzach'
[ERROR ] Command '"C:\Windows\System32\inetsrv\appcmd.exe" list APPPOOL' failed with return code: 1
[ERROR ] stderr: '"C:\Windows\System32\inetsrv\appcmd.exe"' is not recognized as an internal or external command, operable program or batch file.
[ERROR ] retcode: 1
local:
False

@yzach
Copy link
Contributor Author

yzach commented Jun 11, 2015

I did some investigation, it appears that python tries to execute the file C:\"C:\Windows\System32\inetsrv\appcmd.exe" which apparently does not exists.

Further investigation showed that it is caused by a conflict of quoting in modules/iis.py and a later split in modules/cmdmod.py.

I managed to fix it by patching modules/iis.py#49 with the following line:

cmd_ret = __salt__['cmd.run_all']([appcmd, 'list', resource])

Should I submit a pull request?

@jfindlay
Copy link
Contributor

@yzach, yes, that would be great, thanks.

jfindlay added a commit that referenced this issue Jun 14, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants