0
在windows計算機上嘗試state.apply sls時出現以下錯誤。使用名稱爲dsc.apply_config的SaltStack module.run函數運行時出現異常
ID: ProvisionADDC Function: module.run Name: dsc.apply_config Result: False Comment: Module function dsc.apply_config threw an exception. Exception: No JSON results from powershell. Additional info follows: retcode: 0 stderr: stdout: Started: 12:06:08.044000 Duration: 2684.0 ms Changes:
由於win_dsc是執行模塊,然後我被迫使用state.module模塊上運行馬仔此功能:
C:\DSC:
file.directory:
- makedirs: True
allprofiles:
win_firewall.disabled
CopyDSCModules:
file.recurse:
- name: 'C:\Program Files\WindowsPowerShell\Modules'
- source: salt://windows/dsc/
InstallADDomainServices:
win_servermanager.installed:
- name: AD-Domain-Services
- restart: True
- require:
- file: CopyDSCModules
ProvisionADDC:
module.run:
- name: dsc.apply_config
- path: C:\DSC\
- source: salt://windows/mof
- require:
- file: 'C:\DSC'
- file: CopyDSCModules
- win_servermanager: InstallADDomainServices
任何人有win_dsc和SaltStack經驗?