FAQ
I am trying to write some new types of winrepo sls files and could quite do
with knowing how to access or refer to files in the minion's cache download
dirs.

The minions download external installers to files such as:

<"c:\salt">/var/cache/salt/minion/extrn_files/base/www.mywebsite.com/myinstaller.exe

But if the file is a zip file it can't/won't be executed, but it might
still be possible to access by making "clever use" of the installer
argument that is being passed?

Proof of concept test is something along the lines of:

installer: 'http://www.mygreatutil.com/mytest1.zip'
install_flags: '@powershell -NoProfile -ExecutionPolicy unrestricted
-Command "$shell = new-object -com shell.application ; $zip =
$shell.NameSpace("c:\temp\mytest1.zip”) ; foreach($item in $zip.items()) {
$shell.Namespace(“CommonProgramFiles(x86)\mytest1”).copyhere($item) }"'

And what I am trying to find out with this email questoin here is, if I can
somehow use variables of some kind, or other trickery, to have the
install_flags know where in the cache the mytest1.zip file is saved? and
put that var in place of c:\temp\ instead?

Is there some "trick" to find the actual location of the
"cache/salt/minion/extrn_files/base/www.mygreatutil.com" directory? So I
can give the installer flag the location of the mytest1.zip file it just
downloaded for me to unpack it?

Knowing how to access that file location on the minion from an sls file
would probably also open up the possibility of renaming installers that get
stupid names like DOWNLOAD instead of myinstaller.exe etc etc.

Any suggestions? Sorry, if this is not the right place to ask, please let
me know where to direct my questions to instead.

Regards,


--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupsalt-users @
postedFeb 4, '15 at 9:11p
activeFeb 4, '15 at 9:11p
posts1
users1

1 user in discussion

Urs Rau: 1 post

People

Translate

site design / logo © 2022 Grokbase