Closed twangboy closed 6 years ago
@lomeroe ^^^
that section of code calls an os.path.join and then a salt file.file_exists -- I don't see any bugs filed for file.file_exists, but it seems the problem would like in one of those 2 calls.
I will take a deeper look
I took a fresh 2012R2 server with http://repo.saltstack.com/windows/Salt-Minion-2017.7.2-Py3-AMD64-Setup.exe installed and the state applied as expected.
I don't see "HealthService.admx or adml" on this system. What OS? Is there actually a HealthService.adml in the en-US folder?
ZD-1893
The HealthService.admx
and .adml
gets installed with the System Center Operations Manager (SCOM) Agent. I had to install that to replicate this issue... Or I pasted the wrong stacktrace... let me check...
OK, you have to patch the win_lgpo.py
file in C:\salt\bin\Lib\site-packages\salt\modules
with the one from the head of 2017.7... That's the one we fixed to handle the SCOM
issue... then you get the real problem with Py3 support. I updated the StackTrace above... I wish I could attach the patched win_lgpo.py
file...
https://github.com/saltstack/salt/blob/2017.7/salt/modules/win_lgpo.py
I had to use a different state file as well... updated above... Sorry for all the changes...
Description of Issue/Question
Applying Group Policy using the LGPO state module works fine on Py2 and fails on Py3 with an error similar to the following:
Setup
Create a state file as follows (for 2012r2):
Install Python 3 version of Salt 2017.7.2 Copy the patched
win_lgpo.py
from 2017.7 toc:\salt\bin\Lib\site-packages\salt\modules\
Steps to Reproduce Issue
Apply the above state: It will fail with the above stacktrace
Versions Report
2017.7.2 with patched
win_lgpo.py