Giter Club home page Giter Club logo

salt-winrepo's Introduction

salt-winrepo's People

Contributors

ameneau avatar calebcase avatar cro avatar danielcb avatar danjellesma avatar davidjfelix avatar deniswal avatar derphilipp avatar dwiden avatar equinoxefr avatar gajdipajti avatar jcollie avatar jfindlay avatar johnccfm avatar ksmyth avatar lorengordon avatar m03 avatar oro avatar rdoursenaud avatar romanovna avatar rrzaripov avatar sstodd7532 avatar thatch45 avatar thebigbear avatar themalkolm avatar tkent avatar twangboy avatar utahdave avatar viettpham avatar webwurst avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

salt-winrepo's Issues

gow.sls might suffer from current https or SSL issues

I found that the https link is suffering from some sort of TLS SSL issue, I assume it is the same issue that affected me the other day. on anohter package where @UtahDave said it was the SSL setup and a "known issue" and would get fixed 'soon' .

So I will re-test when the new SSL setup is in. Two workarounds in the meantime. 1st try a simple http link instead. If that does not solve it . download it manually and place it in your masters salt://win/repo/gow dir and refer to a salt link instead of the http one for now.
Will keep monitoring this one and comment on the ticket if things change.

ultravnc_x86.sls is malformed - breaks winrepo.genrepo

when generating a new winrepo.genrepo it trips over ultravnc_x86.sls

Failed to compile /srv/salt/win/repo/salt-winrepo.git/ultravnc_x86.sls: while parsing a block mapping
  in "<string>", line 2, column 3:
      1.2.05:
      ^
expected <block end>, but found '<block mapping start>'
  in "<string>", line 10, column 4:
       1.1.9.6:
       ^

Add salt-minion?

I'm kind of surprised that the one piece of software everyone is definitely going to be running on their salt managed windows machines, the salt-minion, is not in the repo yet.

https link does not work for TLS secured DL for teamviewer

I had a TLS https: link for teamviewer and it would not work. It either crashed or gave up, giving an ssl cert error.

    The minion function caused an exception: Traceback (most recent call last):
      File "salt/minion.py", line 1019, in _thread_return
      File "salt/modules/win_pkg.py", line 558, in install
      File "salt/modules/cp.py", line 328, in cache_file
      File "salt/fileclient.py", line 149, in cache_file
      File "salt/fileclient.py", line 591, in get_url
      File "requests/api.py", line 55, in get
      File "requests/api.py", line 44, in request
      File "requests/sessions.py", line 456, in request
      File "requests/sessions.py", line 559, in send
      File "requests/adapters.py", line 382, in send
    SSLError: [Errno 185090050] _ssl.c:340: error:0B084002:x509 certificate routines:X509_load_cert_crl_file:system lib

That happens with the folowing https installer URL, but if you remove the 's' and do a http:// DL it works.

teamviewer:
  10.0.38475:
    installer: 'https://downloadeu1.teamviewer.com/download/TeamViewer_Setup_en.exe'
    full_name: 'TeamViewer 10'
    reboot: False
    install_flags: '/S'
    uninstaller: '%ProgramFiles(x86)%\TeamViewer\uninstall.exe'
    uninstall_flags: '/S'

Is this to be expected or a feature? ;-)

MSI problems

Hi,
it seems like Salt 0.17.4 has som problems installing packages on Windows Server 2012 R2 with MSI.

I performed the following steps:
salt-run winrepo.update_git_repos
salt-run winrepo.genrepo
salt '' pkg.refresh_db
salt '
' pkg.install 7zip
here the minion responses nothing.
On the minion i saw that the 7zip installer was downloaded, but 7zip was not installed.
I have to restart the minion service on the Windows Server to get him work again.

I tried some more packages and it seems that all packages using MSI have the same problem.
The packages not using MSI work fine.

When i'm trying to do an unattended install of the packages on the Windows Server directly via the cmd and the flags of the sls files it worked...

With kind regards,
todesregen

winrepo.genrepo reports exception when using jinja in init.sls

Hi Guys,

I keep getting an exception while applying jinja in init.sls.
The init.sls (/srv/salt/repo/win/splunk/init.sls):

#! yaml_jinja

splunk:
  {% for pkg in ['5.0.6-185900-x64', '5.0.7-192045-x64', '6.0.1-187445-x64'] %}
  {{ pkg }}:
    installer: salt://repo/win/splunk/splunk-{{ pkg }}-release.msi
    full_name: splunk-{{ pkg }}
    reboot: False
    install_flags: 'AGREETOLICENSE=Yes /quiet'
    msiexec: True
    uninstaller: salt://repo/win/splunk/splunk-{{ pkg }}-release.msi
    uninstall_flags: '/quiet'
  {% endfor %}

but i kept getting an excpetion while running "salt-run winrepo.genrepo"

Traceback (most recent call last):
  File "/usr/bin/salt-run", line 10, in <module>
    salt_run()
  File "/usr/lib/python2.7/dist-packages/salt/scripts.py", line 95, in salt_run
    client.run()
  File "/usr/lib/python2.7/dist-packages/salt/cli/__init__.py", line 362, in run
    runner.run()
  File "/usr/lib/python2.7/dist-packages/salt/runner.py", line 218, in run
    self.opts['fun'], self.opts['arg'], self.opts)
  File "/usr/lib/python2.7/dist-packages/salt/runner.py", line 125, in cmd
    return self.functions[fun](*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/salt/runners/winrepo.py", line 46, in genrepo
    config = yaml.safe_load(slsfile.read()) or {}
  File "/usr/lib/python2.7/dist-packages/yaml/__init__.py", line 93, in safe_load
    return load(stream, SafeLoader)
  File "/usr/lib/python2.7/dist-packages/yaml/__init__.py", line 71, in load
    return loader.get_single_data()
  File "/usr/lib/python2.7/dist-packages/yaml/constructor.py", line 37, in get_single_data
    node = self.get_single_node()
  File "/usr/lib/python2.7/dist-packages/yaml/composer.py", line 36, in get_single_node
    document = self.compose_document()
  File "/usr/lib/python2.7/dist-packages/yaml/composer.py", line 55, in compose_document
    node = self.compose_node(None, None)
  File "/usr/lib/python2.7/dist-packages/yaml/composer.py", line 84, in compose_node
    node = self.compose_mapping_node(anchor)
  File "/usr/lib/python2.7/dist-packages/yaml/composer.py", line 133, in compose_mapping_node
    item_value = self.compose_node(node, item_key)
  File "/usr/lib/python2.7/dist-packages/yaml/composer.py", line 64, in compose_node
    if self.check_event(AliasEvent):
  File "/usr/lib/python2.7/dist-packages/yaml/parser.py", line 98, in check_event
    self.current_event = self.state()
  File "/usr/lib/python2.7/dist-packages/yaml/parser.py", line 449, in parse_block_mapping_value
    if not self.check_token(KeyToken, ValueToken, BlockEndToken):
  File "/usr/lib/python2.7/dist-packages/yaml/scanner.py", line 116, in check_token
    self.fetch_more_tokens()
  File "/usr/lib/python2.7/dist-packages/yaml/scanner.py", line 257, in fetch_more_tokens
    % ch.encode('utf-8'), self.get_mark())
yaml.scanner.ScannerError: while scanning for the next token
found character '%' that cannot start any token
  in "<string>", line 4, column 4:
      {% for pkg in ['5.0.6-185900-x64' ...

It seems like the file was not going through jinja, I tried uncommenting the line:

renderer: yaml_jinja

in /etc/salt/master, to make sure it's using yaml_jinja.
win_repo is set to '/srv/salt/repo/win' on purpose (This should not cause the issue, just clearing what I did.)
other settings were left by defaults.

Both salt-master and minion are running at 2014.1.5

I might be missing some settings or misconfiguring the settings, but I couldnt find where.
Could someone help me out?
Thanks in advance.
-bill

gpg4win-light.sls fails to install silently

Unfortunately the gpg4win-light sls https://github.com/saltstack/salt-winrepo/blob/master/gpg4win-light.sls fails to complete installing under salt, because the upstream installer has a bug and the /S cmd line switch does not work completely. It will still ask interactively: "Do you want Claws Mail your default mail client?", and because salt installations do not have a UI, it won't finish installing. Bug ir reported upstream, and I will fix the installer sls as sson as they fix it upstream.

pkg.list_pkgs is incredibly slow when there are many packages installed

It takes a very long time for pkg.list_pkgs to complete when there are a lot of packages installed. For example, I've been doing a little testing with salt directly on my personal laptop, and I used powershell to time the command taking over 40 minutes to complete. Granted, I have 161 installed programs and 96 installed updates, but still...

PS >Measure-Command -Expression {Start-Process C:\salt\salt-call.exe -ArgumentList "--local pkg.list_pkgs" -NoNewWindow -PassThru -Wait}
Days : 0
Hours : 0
Minutes : 42
Seconds : 46
Milliseconds : 889
Ticks : 25668891551
TotalDays : 0.0297093652210648
TotalHours : 0.713024765305555
TotalMinutes : 42.7814859183333
TotalSeconds : 2566.8891551
TotalMilliseconds : 2566889.1551

curl.sls breaks winrepo.genrepo - how is that possible?

My recently submitted curl.sls seems to be breaking the winrepo.genrepo routines. How is that possible? If I remove the curl.sls file from the "/srv/salt/win/repo/salt-winrepo.git" dir on the master, then winrepo.genrepo works again.

What is wrong with my curl.sls file?

salt-run winrepo.genrepo

[ERROR   ] An un-handled exception was caught by salt's global exception handler:
ScannerError: mapping values are not allowed here
  in "<string>", line 4, column 14:
        full_name: 'cURL'
                 ^
Traceback (most recent call last):
  File "/usr/bin/salt-run", line 10, in <module>
    salt_run()
  File "/usr/lib/python2.6/site-packages/salt/scripts.py", line 144, in salt_run
    client.run()
  File "/usr/lib/python2.6/site-packages/salt/cli/__init__.py", line 462, in run
    runner.run()
  File "/usr/lib/python2.6/site-packages/salt/runner.py", line 238, in run
    self.opts['fun'], self.opts['arg'], self.opts)
  File "/usr/lib/python2.6/site-packages/salt/runner.py", line 122, in cmd
    return self.functions[fun](*args, **kwargs)
  File "/usr/lib/python2.6/site-packages/salt/runners/winrepo.py", line 46, in genrepo
    config = yaml.safe_load(slsfile.read()) or {}
  File "/usr/lib64/python2.6/site-packages/yaml/__init__.py", line 75, in safe_load
    return load(stream, SafeLoader)
  File "/usr/lib64/python2.6/site-packages/yaml/__init__.py", line 58, in load
    return loader.get_single_data()
  File "/usr/lib64/python2.6/site-packages/yaml/constructor.py", line 42, in get_single_data
    node = self.get_single_node()
  File "/usr/lib64/python2.6/site-packages/yaml/composer.py", line 36, in get_single_node
    document = self.compose_document()
  File "/usr/lib64/python2.6/site-packages/yaml/composer.py", line 55, in compose_document
    node = self.compose_node(None, None)
  File "/usr/lib64/python2.6/site-packages/yaml/composer.py", line 84, in compose_node
    node = self.compose_mapping_node(anchor)
  File "/usr/lib64/python2.6/site-packages/yaml/composer.py", line 133, in compose_mapping_node
    item_value = self.compose_node(node, item_key)
  File "/usr/lib64/python2.6/site-packages/yaml/composer.py", line 84, in compose_node
    node = self.compose_mapping_node(anchor)
  File "/usr/lib64/python2.6/site-packages/yaml/composer.py", line 127, in compose_mapping_node
    while not self.check_event(MappingEndEvent):
  File "/usr/lib64/python2.6/site-packages/yaml/parser.py", line 93, in check_event
    self.current_event = self.state()
  File "/usr/lib64/python2.6/site-packages/yaml/parser.py", line 423, in parse_block_mapping_key
    if self.check_token(KeyToken):
  File "/usr/lib64/python2.6/site-packages/yaml/scanner.py", line 116, in check_token
    self.fetch_more_tokens()
  File "/usr/lib64/python2.6/site-packages/yaml/scanner.py", line 220, in fetch_more_tokens
    return self.fetch_value()
  File "/usr/lib64/python2.6/site-packages/yaml/scanner.py", line 580, in fetch_value
    self.get_mark())
ScannerError: mapping values are not allowed here
  in "<string>", line 4, column 14:
        full_name: 'cURL'
                 ^
Traceback (most recent call last):
  File "/usr/bin/salt-run", line 10, in <module>
    salt_run()
  File "/usr/lib/python2.6/site-packages/salt/scripts.py", line 144, in salt_run
    client.run()
  File "/usr/lib/python2.6/site-packages/salt/cli/__init__.py", line 462, in run
    runner.run()
  File "/usr/lib/python2.6/site-packages/salt/runner.py", line 238, in run
    self.opts['fun'], self.opts['arg'], self.opts)
  File "/usr/lib/python2.6/site-packages/salt/runner.py", line 122, in cmd
    return self.functions[fun](*args, **kwargs)
  File "/usr/lib/python2.6/site-packages/salt/runners/winrepo.py", line 46, in genrepo
    config = yaml.safe_load(slsfile.read()) or {}
  File "/usr/lib64/python2.6/site-packages/yaml/__init__.py", line 75, in safe_load
    return load(stream, SafeLoader)
  File "/usr/lib64/python2.6/site-packages/yaml/__init__.py", line 58, in load
    return loader.get_single_data()
  File "/usr/lib64/python2.6/site-packages/yaml/constructor.py", line 42, in get_single_data
    node = self.get_single_node()
  File "/usr/lib64/python2.6/site-packages/yaml/composer.py", line 36, in get_single_node
    document = self.compose_document()
  File "/usr/lib64/python2.6/site-packages/yaml/composer.py", line 55, in compose_document
    node = self.compose_node(None, None)
  File "/usr/lib64/python2.6/site-packages/yaml/composer.py", line 84, in compose_node
    node = self.compose_mapping_node(anchor)
  File "/usr/lib64/python2.6/site-packages/yaml/composer.py", line 133, in compose_mapping_node
    item_value = self.compose_node(node, item_key)
  File "/usr/lib64/python2.6/site-packages/yaml/composer.py", line 84, in compose_node
    node = self.compose_mapping_node(anchor)
  File "/usr/lib64/python2.6/site-packages/yaml/composer.py", line 127, in compose_mapping_node
    while not self.check_event(MappingEndEvent):
  File "/usr/lib64/python2.6/site-packages/yaml/parser.py", line 93, in check_event
    self.current_event = self.state()
  File "/usr/lib64/python2.6/site-packages/yaml/parser.py", line 423, in parse_block_mapping_key
    if self.check_token(KeyToken):
  File "/usr/lib64/python2.6/site-packages/yaml/scanner.py", line 116, in check_token
    self.fetch_more_tokens()
  File "/usr/lib64/python2.6/site-packages/yaml/scanner.py", line 220, in fetch_more_tokens
    return self.fetch_value()
  File "/usr/lib64/python2.6/site-packages/yaml/scanner.py", line 580, in fetch_value
    self.get_mark())
yaml.scanner.ScannerError: mapping values are not allowed here
  in "<string>", line 4, column 14:
        full_name: 'cURL'

torn between winrepo.genrepo syntax and sls syntax - can't "please" both

Not sure how to navigate around this one. It might be a python quoting issue, but here goes.
when trying to run winrepo.genrepo on the master I get

Failed to compile /srv/salt/win/repo/sums/init.sls: while parsing a block mapping
  in "<string>", line 3, column 5:
        installer: 'http://www.nfllab.co ... 
        ^
expected <block end>, but found '<scalar>'
  in "<string>", line 6, column 157:
     ... tion ; $zip = $shell.NameSpace('c:\salt\var\cache\salt\minion\ex ... 
                                         ^

the sums.sls alpha quality sls file is:

sums:
  6.11:
    installer: 'http://www.nfllab.com/sums/sums611.zip'
    full_name: 'GNU coreutils sums (md5 sha1 sha224 sha256 sha384 sha512) ver. 6.11'
    reboot: False
    install_flags: ' ; @powershell -NoProfile -ExecutionPolicy unrestricted -Command "$shell = new-object -com shell.application ; $zip = $shell.NameSpace('c:\salt\var\cache\salt\minion\extrn_files\base\nfllab.com\sums\sums611.zip') ; foreach($item in $zip.items()) { $shell.Namespace('c:\windows').copyhere($item,0x14) }"'
    uninstaller: 'cmd'
    uninstall_flags: '/c del /q /f %SystemRoot%\readme & del /q /f %SystemRoot%\copying & del /q /f %SystemRoot%\md5sum.exe & del /q /f %SystemRoot%\sha1sum.exe & del /q /f %SystemRoot%\sha224sum.exe & del /q /f %SystemRoot%\sha256sum.exe & del /q /f %SystemRoot%\sha384sum.exe & del /q /f %SystemRoot%\sha512sum.exe & exit 0'

The problem would appear to be the single quote in install_flags: line column 157. The open single quote before the c:\salt\var\cache\salt\minion\ex ...

What do I do? I tested it on the windows Powershell cmd line and powershell does need a single quote there, or it will give me an error, but the winrepo.genrepo chokes on it?

This issue is mostly interested in the syntax required to satisfy both winrepo.genrepo on the linux master and powershell on the windows minion.

Please ignore the silly attempt, to run an installer inside the 'install_flags:' parameter, afaik it probably won't work since the 'installer:" will fail as it is not an executable or actual installer, but merely a zip file. But I was hoping I coudl trick the salt into downloading the zip file for me into the local cache, and I coud then go fetch it from there and unpack it. But if you have a way to achive this, then please do point me to it. ;-)

Add ability to push down additional files or a directory

For example, by trying to install jre7 on win2k8r2. From http://wpkg.org/Java:

"On 64-bit hosts installing the exe doesn't work: the silent install on a 64-bit host is still looking for the msi in the *System32* directory, so the best thing to do is to install the msi package."

Problem is that if you obtain the extracted .msi by running the .exe and finding the temporary extracted directory (outlined at http://goo.gl/wCzMI), it also needs the accompanying Data1.cab file in addition to jre1.7.0_25.msi.

Putty URL needs updating.

Just needs to avoid using 'latest' in the URL since that can change over time. This should be more stable:

diff --git a/putty.sls b/putty.sls
index 742e1ad..9967af0 100644
--- a/putty.sls
+++ b/putty.sls
@@ -1,6 +1,6 @@
 putty:
   0.62:
-    installer: 'http://the.earth.li/~sgtatham/putty/latest/x86/putty-0.62-installer.exe'
+    installer: 'http://the.earth.li/~sgtatham/putty/0.62/x86/putty-0.62-installer.exe'
     full_name:  'PuTTY version 0.62'
     reboot: False
     install_flags: '/sp- /verysilent'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.