Downloads:

45,715

Downloads of v 2019.2.0:

7,041

Last Update:

26 Feb 2019

Package Maintainer(s):

Software Author(s):

  • SaltStack

Tags:

salt minion admin saltstack

Salt Minion

This is not the latest version of Salt Minion available.

2019.2.0 | Updated: 26 Feb 2019

Downloads:

45,715

Downloads of v 2019.2.0:

7,041

Software Author(s):

  • SaltStack

Salt Minion 2019.2.0

This is not the latest version of Salt Minion available.

All Checks are Passing

2 Passing Test


Validation Testing Passed


Verification Testing Passed

Details

To install Salt Minion, run the following command from the command line or from PowerShell:

>

To upgrade Salt Minion, run the following command from the command line or from PowerShell:

>

To uninstall Salt Minion, run the following command from the command line or from PowerShell:

>

NOTE: This applies to both open source and commercial editions of Chocolatey.

1. Ensure you are set for organizational deployment

Please see the organizational deployment guide

  • Open Source or Commercial:
    • Proxy Repository - Create a proxy nuget repository on Nexus, Artifactory Pro, or a proxy Chocolatey repository on ProGet. Point your upstream to https://chocolatey.org/api/v2. Packages cache on first access automatically. Make sure your choco clients are using your proxy repository as a source and NOT the default community repository. See source command for more information.
    • You can also just download the package and push it to a repository Download

3. Enter your internal repository url

(this should look similar to https://chocolatey.org/api/v2)

4. Choose your deployment method:


choco upgrade saltminion -y --source="'STEP 3 URL'" [other options]

See options you can pass to upgrade.

See best practices for scripting.

Add this to a PowerShell script or use a Batch script with tools and in places where you are calling directly to Chocolatey. If you are integrating, keep in mind enhanced exit codes.

If you do use a PowerShell script, use the following to ensure bad exit codes are shown as failures:


choco upgrade saltminion -y --source="'STEP 3 URL'" 
$exitCode = $LASTEXITCODE

Write-Verbose "Exit code was $exitCode"
$validExitCodes = @(0, 1605, 1614, 1641, 3010)
if ($validExitCodes -contains $exitCode) {
  Exit 0
}

Exit $exitCode

- name: Ensure saltminion installed
  win_chocolatey:
    name: saltminion
    state: present
    version: 2019.2.0
    source: STEP 3 URL

See docs at https://docs.ansible.com/ansible/latest/modules/win_chocolatey_module.html.

Coming early 2020! Central Managment Reporting available now! More information...


chocolatey_package 'saltminion' do
  action    :install
  version  '2019.2.0'
  source   'STEP 3 URL'
end

See docs at https://docs.chef.io/resource_chocolatey_package.html.


Chocolatey::Ensure-Package
(
    Name: saltminion,
    Version: 2019.2.0,
    Source: STEP 3 URL
);

Requires Otter Chocolatey Extension. See docs at https://inedo.com/den/otter/chocolatey.


cChocoPackageInstaller saltminion
{
   Name     = 'saltminion'
   Ensure   = 'Present'
   Version  = '2019.2.0'
   Source   = 'STEP 3 URL'
}

Requires cChoco DSC Resource. See docs at https://github.com/chocolatey/cChoco.


package { 'saltminion':
  provider => 'chocolatey',
  ensure   => '2019.2.0',
  source   => 'STEP 3 URL',
}

Requires Puppet Chocolatey Provider module. See docs at https://forge.puppet.com/puppetlabs/chocolatey.


salt '*' chocolatey.install saltminion version="2019.2.0" source="STEP 3 URL"

See docs at https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.chocolatey.html.

5. If applicable - Chocolatey configuration/installation

See infrastructure management matrix for Chocolatey configuration elements and examples.

This package was approved as a trusted package on 09 Sep 2019.

Description

This package installs a salt minion on your system as a windows service. The Salt minion receives commands from the central Salt master and replies with the results of said commands. It can also be used in standalone mode to apply states to a machine without a master by using C:\salt\salt-call.bat --local state.sls [yoursls] or similar commands with --local.
Note that this package supports two arguments: /master=yoursaltmaster and /minion=yourminionname (note the installer itself uses /minion-name, but parsing dictionary keys with the - is painful).
These arguments can be passed to the package via the --params '/master=yoursaltmaster'. The custom salt master is recommended in most environments, the minion name is optional will default to the hostname if not supplied.


tools\chocolateyBeforeModify.ps1
# Need to keep a copy of the C:\salt\conf\minion and minion.d files in case the user is upgrading and wants to persist their existing settings.
$chocoBackup =  '$env:ProgramData\chocolatey\lib-bkp\saltconfig'
$saltConfig = 'C:\salt\conf\'
# Items to keep around, 'pki' is "identity", 'minion[_id]' is settings and ID, 'minion.d' is additional settings
#if (Test-Path $saltConfig ) { copy-item $saltConfig $chocoBackup -recurse }
# In chocolateyInstall.ps1 will need to look for a previous backup and restore files either before install or after upgrade (only IF the master & minion ID match?)
# if (Test-Path $chocoBackup) { copy-item $chocoBackup $saltConfig -recurse }
# Maybe do the backup via another package that simply assumes C:\salt\conf and performs the backup? but reverse-depends don't work here
# In chocolateyUninstall.ps1 will need to remove $chocoBackup if it exists but only if doing a real uninstall and not an upgrade
tools\chocolateyInstall.ps1
$packageName = 'saltminion'

# Update these URLs and checksums when deploying a new version
$url64 = 'https://repo.saltstack.com/windows/Salt-Minion-2019.2.0-Py3-AMD64-Setup.exe'
$checksum64 = '9C46F59C223610009A76F5150883C3D3'
$url = 'https://repo.saltstack.com/windows/Salt-Minion-2019.2.0-Py3-x86-Setup.exe'
$checksum = 'F4C874155C9A565356D201DB4C2D4998'

# Get arguments to download the file from the URLs and checksums above
$packageArgs = @{
  packageName   = $packageName
  fileType      = 'exe'
  url           = $url
  url64bit      = $url64
  silentArgs    = "/S"
  softwareName  = 'Salt*'
  checksum      = $checksum
  checksumType  = 'md5'
  checksum64    = $checksum64
  checksumType64= 'md5'
}

$arguments = @{};
# /master=myMaster /minion=myMinion
$packageParameters = $env:chocolateyPackageParameters;
$packageParameters
# Default the values
$saltMaster = ''
$minionName = ''

# Now parse the packageParameters using good old regular expression
if ($packageParameters) {
    $match_pattern = "\/(?<option>([a-zA-Z]+))=(?<value>([`"'])?([a-zA-Z0-9- _\\:\.]+)([`"'])?)|\/(?<option>([a-zA-Z]+))"
    #"
    $option_name = 'option'
    $value_name = 'value'

    if ($packageParameters -match $match_pattern ){
        $results = $packageParameters | Select-String $match_pattern -AllMatches
        $results.matches | % {
          $arguments.Add(
              $_.Groups[$option_name].Value.Trim(),
              $_.Groups[$value_name].Value.Trim())
      }
    }
    else
    {
      throw "Package Parameters were found but were invalid (REGEX Failure)"
    }

    if ($arguments.ContainsKey("master")) {
        Write-Host "You specified a custom master address"
        $saltMaster = $arguments['master']
        $packageArgs['silentArgs'] += " /master=$saltMaster"
    }

    if ($arguments.ContainsKey("minion")) {
        Write-Host "You specified a custom minion ID"
        $minionName = $arguments['minion']
        $packageArgs['silentArgs'] += " /minion-name=$minionName"
    }
} else {
    Write-Debug "No Package Parameters Passed in, using defaults of /master=salt and /minion=$env:COMPUTERNAME"
}
install-ChocolateyPackage @packageArgs

tools\chocolateyUninstall.ps1
# By default, salt installs in c:\salt This package will attempt to call the uninstall executable from there. 
C:\salt\uninst.exe /S

In cases where actual malware is found, the packages are subject to removal. Software sometimes has false positives. Moderators do not necessarily validate the safety of the underlying software, only that a package retrieves software from the official distribution point and/or validate embedded software against official distribution point (where distribution rights allow redistribution).

Chocolatey Pro provides runtime protection from possible malware.

Version Downloads Last Updated Status
Salt Minion 2019.2.1 1095 Monday, September 30, 2019 Approved
Salt Minion 2019.2.0 7041 Tuesday, February 26, 2019 Approved
Salt Minion 2018.3.4 645 Tuesday, February 26, 2019 Approved
Salt Minion 2018.3.3.3 1171 Thursday, January 17, 2019 Approved
Salt Minion 2018.3.3.2 271 Wednesday, January 16, 2019 Approved
Salt Minion 2018.3.3.1 1842 Monday, November 12, 2018 Approved
Salt Minion 2018.3.3 1959 Wednesday, October 24, 2018 Approved
Salt Minion 2018.3.2 4348 Wednesday, June 27, 2018 Approved
Salt Minion 2018.3.1 578 Wednesday, June 13, 2018 Approved

  • Updated to latest version
    * Use Python 3
    * Rebuilt 2019-01-17 with updated checksums using the Python 3 installers
Discussion for the Salt Minion Package

Ground Rules:

  • This discussion is only about Salt Minion and the Salt Minion package. If you have feedback for Chocolatey, please contact the Google Group.
  • This discussion will carry over multiple versions. If you have a comment about a particular version, please note that in your comments.
  • The maintainers of this Chocolatey Package will be notified about new comments that are posted to this Disqus thread, however, it is NOT a guarantee that you will get a response. If you do not hear back from the maintainers after posting a message below, please follow up by using the link on the left side of this page or follow this link to contact maintainers. If you still hear nothing back, please follow the package triage process.
  • Tell us what you love about the package or Salt Minion, or tell us what needs improvement.
  • Share your experiences with the package, or extra configuration or gotchas that you've found.
  • If you use a url, the comment will be flagged for moderation until you've been whitelisted. Disqus moderated comments are approved on a weekly schedule if not sooner. It could take between 1-5 days for your comment to show up.
comments powered by Disqus