salt stack - saltstack: run powershell script in a state -


i'm trying download uru bitbucket , try install using vagrant default login credentials. i'm able download archive. when ever try run script see error - invalidly-formated env parameter. see documentation. i'm able run script without errors. i'm running locally using vagrant in masterless mode. appreciated.

download_uru:   file.managed:     - name: c:\uru-0.8.3-windows-x86.7z     - source: https://bitbucket.org/jonforums/uru/downloads/uru-0.8.3-windows-x86.7z     - source_hash: sha256=f2a7b4ed8ef6b02613b134da19a31293c7423e8fbbd8e49ec5c1c86c5f3a0815  install_uru:   cmd.run:     - source: salt://ruby/files/install_uru.ps1     - shell: powershell     - env: "-executionpolicy bypass"     - runas: "vagrant"     - password: "vagrant"     - require:       - file: download_uru 

$cat install_uru.ps1

set-alias sz "$env:programfiles\7-zip\7z.exe"  sz x -oc: c:\uru-0.8.3-windows-x86.7z -r ; 

c:\salt\salt-call.bat --version

salt-call 2016.11.3 (carbon)

your problem due wrong format of -env parameter. described in official documentation must list , setting string.

fix install_uru state code below , run correctly.

install_uru:   cmd.run:     - source: salt://ruby/install_uru.ps1     - shell: powershell     - env:        - executionpolicy: "bypass"     - runas: "vagrant"     - password: "vagrant"     - require:       - file: download_uru 

Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -