This code is forked from https://github.com/saltstack/saltwinshell.
The Agentless Windows Module can run any Salt SSH command on a target Windows server or desktop, such as the following:
salt-ssh testwin disk.usage
- English version of Windows
- Windows versions:
- Windows 7
- Windows 8.1
- Windows 10
- Windows Server 2008 R2
- Windows Server 2012 R2
- Windows Server 2016
- Powershell 3.0 or later
- OpenSSH
- A key for the admin user
- The
/etc/salt/rosterfile must have a configuration section for every Windows machine you want to connect to. The configuration must have a local admin user, as in the following example. Note that the private key defaults to /etc/salt/pki/master/ssh/salt-ssh.id_ed25519
win2012dev: # Minion ID
host: <IP address or hostname>
user: <local Windows admin username>
priv: <path to private key for ssh>
winrm: TrueNOTE: Domain credentials are not supported.
clone, build, and install from https://github.com/nychef/saltwinshell
Install on your working Salt Master:
python3 setup.py build
pyton3 setup.py install
salt-ssh <minion id> test.ping
The first time you run salt-ssh against a Windows minion it will take a bit
longer than usual since it has to deploy a working Salt python environment.
Subsequent runs should be much faster.
The shell libraries for agentless Windows to work via salt-ssh, installing
this library activates the ability to hit windows targets.
- Create a new branch:
git checkout -b <new branch name>
- Make updates.
- Create a tag:
git tag -a v2018.3 -m "Version v2018.3 release" -s
git push origin 2018.3
git push --tags
-
Copy in your python environment zip files to the root. Make sure they match what the setup.py is expecting.
-
Run the following:
python setup.py bdist_wheelThe file you want will be found in the
distdirectory and will look something like:saltwinshell-2017.7-cp27-cp27mu-linux_x86_64.whl -
Copy to the pypi state for distribution