Feature Requests: Windows Software Repository and Windows File Version #67293
Replies: 9 comments
-
From memory this should only happen if you use |
Beta Was this translation helpful? Give feedback.
-
#47702 fixed an upgrade issue. Best version to check with are 2017.7.6 and 2018.3.1 |
Beta Was this translation helpful? Give feedback.
-
I use the current salt version 2018.3.3. salt 'win*' pkg.install vs_remotetools_2017 Then I have changed the version in the registry Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{8503049A-527C-3361-AFB9-1A4E5E0AEF55} Therefore I estimate that if the package is found by name, the installation will be suspended. However, this behavior could be improved when using latest as version. I think it would be helpful, because windows behaves a little different than Linux.
This would help a lot, because otherwise there is only the workaround to uninstall and reinstall the software every time. Even if the version hasn't changed. I would definitely not change the default behavior, but solve for this more specific topic with an additional parameter. In the future the problem of version and download links will definitely increase further. |
Beta Was this translation helpful? Give feedback.
-
Current if the software is installed no action is taken unless you specify a version or specify latest. This is by design. The following is the correct and expected behavior on windows.
This is the correct output for No Change. When using states, the "pkg state" puts some more words around it. The commands provided to you in the previous post are direct commands to the pkg module.
As SLS Pkg definition file contains latest as a version, download and install the software as there is no other way too ensure the latest software is installed. Note until the software (latest) is installed you can not determine its version.
Here is the sls definition
This is design to prevent an endless loop of installs every-time the state is run. Which you can still have by using pkg.latest i.e. So specific to states with the "latest" listed as a available version.
Use "installed" if you want to ensure any version is installed. Best for software which has its own auto updates process e.g. chrome. |
Beta Was this translation helpful? Give feedback.
-
You're right, with software like Chrome it's usually better to use the user installer that updates itself. In my request, I have the view of an enterprise company where users have very limited rights and where software and updates are usually rolled out via a central deployment tool. Or in some cases, for security reasons, it may be necessary to update to the latest version instead of waiting for the autoupdate or the user to perform the update. I think the example with the My current workaround is, that I download the software and put it in to the local winrepo and define the version number. |
Beta Was this translation helpful? Give feedback.
-
I understand where your coming from. Its a pain. The only solution I can think of is a dedicated Windows VM. Which once a week downloads the software, installs it checks the version, and if the version changes takes a copy of the installer, and places on the salt server or some other location locally, and sends you a notification, so you can decide to use it or not. When you have your change request ready update all the clients. Or on the salt master a cron job fetches the file once a week and if the changes, updates the file on the salt server and force a reinstall. It is possible to automate if you have a spare windows vm. The next version of this software will:
However none of the above helps here. From an enterprise point of view should never download directly from the internet. As there should be a verification step, to ensure the software has not been replace by malware. Like to see downloads signed by PGP so downloads could be checked with confidence. As checksum can be changed. I do have code which pulls the file version and product version out of an exe, but its not part of the new code release yet. It was more intended for software which does not place a version in the registry. |
Beta Was this translation helpful? Give feedback.
-
Good tip, the VM solution is probably the best solution in this case. If I understand this correctly, the Windows Repo function will be improved in the future. I think it makes really sense to implement your code in the official salt version. Because especially with self-written tools and services, not everything is always written cleanly into the registry or when a certain exe / dll file version should be checked. I have 2 other points, which very time consuming, maybe these things could be improved... If the installer is located in the local winrepo, source_hash parameter is a good option to ensure that a file has been successfully transferred from salt-master to salt-minion. Especially if the systems are distributed worldwide, this check makes sense. Could this parameter be extended to include the possibility that the saltmaster / saltminion independently checks and compares the source hash with the target hash or do you have another idea to improve this case? I know that this will probably create more load on the salt-master and the state will need more time. Copy retry function: |
Beta Was this translation helpful? Give feedback.
-
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue. |
Beta Was this translation helpful? Give feedback.
-
Thank you for updating this issue. It is no longer marked as stale. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I have 2 feature requests, which would be very useful under Windows, especially for updating software.
The disadvantage is that even if the version has not changed, the software is reinstalled every time the state is executed. From my point of view, there would be a way how this could be avoided for most installers under Windows.
On many installers, the "File version", "Product version" or "Comments" field contains the correct version, which could be compared with the version displayed under "Program and Files" if the software is installed.
The installer must still be downloaded for comparison, but the software will not be reinstalled every time the state is running. This is not a perfect solution, but still a good improvement.
For this, winrepo functionality would have to be extended by an additional parameter, if
latest
was selected in the version specification.Currently no module or state exists, which can get the file version under windows, comparable to the ansible module win_file_version
https://docs.ansible.com/ansible/latest/modules/win_file_version_module.html
It`s possible to check the file hash or other workarounds for Installers / DLLs, but it is also much more effort intensive. This would also be very helpful under Windows.
@twangboy - Feature Request is created!
Best,
Stefan
Beta Was this translation helpful? Give feedback.
All reactions