Discussion:
[salt-users] Salt state examples/tips with Windows...
Jeff
2014-11-11 18:16:56 UTC
Permalink
Some of the things I want to do include (based on the windows version):

- Registry updates:
- set the "auto login" registry settings
- Disable windows update (specifically to control which IE browser
versions are installed)
- Enable RDP (via registry?)
- Map network drives (net use...)
- Update files from a remote SMB share (robocopy/xcopy?)
- selenium grid files/shortcuts
- Extract zip file (sysinternalssuite.zip)
- Configure shortcuts
- startup shortcuts
- BGInfo
- Selenium Grid Node startup
- Desktop shortcuts
- install/validate software packages (Firefox, Chrome, Safari, IE
version)

I am currently pointing to the windows repo in github, but I think I need
to add to that or create an internal one for additional packages, but I'd
really like to see/understand how others may have approached/solved this
type of configuration.

Thanks!
--
Jeff Vincent
See my LinkedIn profile at:
http://www.linkedin.com/in/rjeffreyvincent
--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loren Gordon
2014-11-12 12:44:46 UTC
Permalink
Hi Jeff,
I've worked a bit using salt to configure Windows systems. I'm using a
masterless configuration at the moment, where the salt install and
configuration is deployed to every Windows system via a bootstrap script
and executed locally.

- Registry updates:
- You can use salt to manage the registry, though it's important to
realize that AD or local GPO settings will override anything you place in
the registry. I chose to use Microsoft's Apply_LGPO_Delta utility to
configure the local GPO or registry, and I use salt to manage a file
containing the LGPO settings as well as to execute LGPO.
- registry
state: http://docs.saltstack.com/en/latest/ref/states/all/salt.states.reg.html
- registry
module: http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.reg.html
-
LGPO: http://blogs.technet.com/b/fdcc/archive/2008/05/07/lgpo-utilities.aspx
- Map network drive:
- I haven't had to do this. I'm not seeing a built-in state or module
to map a drive, but you could use cmd.run to execute a batch or powershell
command
- cmd state:
http://docs.saltstack.com/en/latest/ref/states/all/salt.states.cmd.html
- Update files from a remote SMB share
- Salt has it's own file distribution mechanism. Do the files have to
be on the existing share, or could you move them to the salt master? If you
move them, then you can easily use file.managed. file.managed also supports
HTTPS, FTP, AWS S3, and Openstack Swift sources, but I don't see a native
option for SMB. Do you have the option of fronting the SMB share with a web
server and directory browsing?
- file
state: http://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html
- file
module: http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.file.html
- Extract zip file
- There's no simple way of extracting a zip file on Windows. I replied
to another user asking how to do this and provided a PowerShell function.
- https://groups.google.com/forum/#!topic/salt-users/rgVPHDkJRYI
- Configure shortcuts
- Shortcuts are files, so they could perhaps be managed in the same
way as any other file?
- Install/validate software packages
- Are you already using the salt windows package manager?
-
http://docs.saltstack.com/en/latest/topics/windows/windows-package-manager.html

-Loren
Post by Jeff
- set the "auto login" registry settings
- Disable windows update (specifically to control which IE browser
versions are installed)
- Enable RDP (via registry?)
- Map network drives (net use...)
- Update files from a remote SMB share (robocopy/xcopy?)
- selenium grid files/shortcuts
- Extract zip file (sysinternalssuite.zip)
- Configure shortcuts
- startup shortcuts
- BGInfo
- Selenium Grid Node startup
- Desktop shortcuts
- install/validate software packages (Firefox, Chrome, Safari, IE
version)
I am currently pointing to the windows repo in github, but I think I need
to add to that or create an internal one for additional packages, but I'd
really like to see/understand how others may have approached/solved this
type of configuration.
Thanks!
--
Jeff Vincent
http://www.linkedin.com/in/rjeffreyvincent
--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Shem Nguyen
2015-02-13 02:33:37 UTC
Permalink
I'm going to have to second your "Map Network drives" one.
I've used:

'net use P: \\a\network\location':
cmd.run:
- creates: 'P:'

It seems to mount a drive, but the drive appears with a "disconnected" icon
when I look at it in My Computer. It's still accessible though. I'm
probably going to log this as an issue on the repository. If anyone's found
a way around this, I'd love to know.
Post by Jeff
- set the "auto login" registry settings
- Disable windows update (specifically to control which IE browser
versions are installed)
- Enable RDP (via registry?)
- Map network drives (net use...)
- Update files from a remote SMB share (robocopy/xcopy?)
- selenium grid files/shortcuts
- Extract zip file (sysinternalssuite.zip)
- Configure shortcuts
- startup shortcuts
- BGInfo
- Selenium Grid Node startup
- Desktop shortcuts
- install/validate software packages (Firefox, Chrome, Safari, IE
version)
I am currently pointing to the windows repo in github, but I think I need
to add to that or create an internal one for additional packages, but I'd
really like to see/understand how others may have approached/solved this
type of configuration.
Thanks!
--
Jeff Vincent
http://www.linkedin.com/in/rjeffreyvincent
--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Jonathan Roy
2015-02-13 13:14:37 UTC
Permalink
The drive appears disconnected possibly because it has been created with a
different account.
The salt-minion run with the system user and you are most certainly
veryfing the state of the drive with another account.
Post by Shem Nguyen
I'm going to have to second your "Map Network drives" one.
- creates: 'P:'
It seems to mount a drive, but the drive appears with a "disconnected"
icon when I look at it in My Computer. It's still accessible though. I'm
probably going to log this as an issue on the repository. If anyone's found
a way around this, I'd love to know.
Post by Jeff
- set the "auto login" registry settings
- Disable windows update (specifically to control which IE browser
versions are installed)
- Enable RDP (via registry?)
- Map network drives (net use...)
- Update files from a remote SMB share (robocopy/xcopy?)
- selenium grid files/shortcuts
- Extract zip file (sysinternalssuite.zip)
- Configure shortcuts
- startup shortcuts
- BGInfo
- Selenium Grid Node startup
- Desktop shortcuts
- install/validate software packages (Firefox, Chrome, Safari, IE
version)
I am currently pointing to the windows repo in github, but I think I need
to add to that or create an internal one for additional packages, but I'd
really like to see/understand how others may have approached/solved this
type of configuration.
Thanks!
--
Jeff Vincent
http://www.linkedin.com/in/rjeffreyvincent
--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Shem Nguyen
2015-04-01 00:27:42 UTC
Permalink
Yep, is there any chance you found a way around this?
Post by Jonathan Roy
The drive appears disconnected possibly because it has been created with a
different account.
The salt-minion run with the system user and you are most certainly
veryfing the state of the drive with another account.
Post by Shem Nguyen
I'm going to have to second your "Map Network drives" one.
- creates: 'P:'
It seems to mount a drive, but the drive appears with a "disconnected"
icon when I look at it in My Computer. It's still accessible though. I'm
probably going to log this as an issue on the repository. If anyone's found
a way around this, I'd love to know.
Post by Jeff
- set the "auto login" registry settings
- Disable windows update (specifically to control which IE
browser versions are installed)
- Enable RDP (via registry?)
- Map network drives (net use...)
- Update files from a remote SMB share (robocopy/xcopy?)
- selenium grid files/shortcuts
- Extract zip file (sysinternalssuite.zip)
- Configure shortcuts
- startup shortcuts
- BGInfo
- Selenium Grid Node startup
- Desktop shortcuts
- install/validate software packages (Firefox, Chrome, Safari, IE
version)
I am currently pointing to the windows repo in github, but I think I
need to add to that or create an internal one for additional packages, but
I'd really like to see/understand how others may have approached/solved
this type of configuration.
Thanks!
--
Jeff Vincent
http://www.linkedin.com/in/rjeffreyvincent
--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Oliver Bestwalter
2015-05-15 12:02:55 UTC
Permalink
Hi,
Post by Jonathan Roy
The drive appears disconnected possibly because it has been created with a
different account.
The salt-minion run with the system user and you are most certainly
veryfing the state of the drive with another account.
correct. I am looking into this as well and just found an issue about
this: https://github.com/saltstack/salt/issues/20672

Cheers
Oliver
--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...