mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge branch '2017.7' into whitelisted_acl
This commit is contained in:
commit
18e460fc30
414 changed files with 138822 additions and 28741 deletions
8
.github/CODEOWNERS
vendored
8
.github/CODEOWNERS
vendored
|
@ -52,6 +52,14 @@ salt/**/thin.py @saltstack/team-ssh
|
|||
# Team State
|
||||
salt/state.py @saltstack/team-state
|
||||
|
||||
# Team SUSE
|
||||
salt/**/*btrfs* @saltstack/team-suse
|
||||
salt/**/*kubernetes* @saltstack/team-suse
|
||||
salt/**/*pkg* @saltstack/team-suse
|
||||
salt/**/*snapper* @saltstack/team-suse
|
||||
salt/**/*xfs* @saltstack/team-suse
|
||||
salt/**/*zypper* @saltstack/team-suse
|
||||
|
||||
# Team Transport
|
||||
salt/transport/ @saltstack/team-transport
|
||||
salt/utils/zeromq.py @saltstack/team-transport
|
||||
|
|
8
.gitignore
vendored
8
.gitignore
vendored
|
@ -92,7 +92,9 @@ tests/integration/cloud/providers/pki/minions
|
|||
# Ignore tox virtualenvs
|
||||
/.tox/
|
||||
|
||||
# Ignore kitchen stuff
|
||||
.kitchen
|
||||
.bundle
|
||||
# Kitchen tests files
|
||||
.kitchen.local.yml
|
||||
.kitchen/
|
||||
.bundle/
|
||||
Gemfile.lock
|
||||
/artifacts/
|
||||
|
|
156
.kitchen.yml
156
.kitchen.yml
|
@ -1,8 +1,9 @@
|
|||
---
|
||||
<% vagrant = system('which vagrant 2>/dev/null >/dev/null') %>
|
||||
<% version = '2017.7.1' %>
|
||||
<% version = '2017.7.4' %>
|
||||
<% platformsfile = ENV['SALT_KITCHEN_PLATFORMS'] || '.kitchen/platforms.yml' %>
|
||||
<% driverfile = ENV['SALT_KITCHEN_DRIVER'] || '.kitchen/driver.yml' %>
|
||||
<% verifierfile = ENV['SALT_KITCHEN_VERIFIER'] || '.kitchen/verifier.yml' %>
|
||||
|
||||
<% if File.exists?(driverfile) %>
|
||||
<%= ERB.new(File.read(driverfile)).result %>
|
||||
|
@ -12,7 +13,7 @@ driver:
|
|||
use_sudo: false
|
||||
hostname: salt
|
||||
privileged: true
|
||||
username: root
|
||||
username: kitchen
|
||||
volume:
|
||||
- /var/run/docker.sock:/docker.sock
|
||||
cap_add:
|
||||
|
@ -21,18 +22,21 @@ driver:
|
|||
provision_command:
|
||||
- echo 'L /run/docker.sock - - - - /docker.sock' > /etc/tmpfiles.d/docker.conf
|
||||
transport:
|
||||
name: sftp
|
||||
name: rsync
|
||||
<% end %>
|
||||
|
||||
sudo: false
|
||||
provisioner:
|
||||
name: salt_solo
|
||||
salt_install: bootstrap
|
||||
salt_version: latest
|
||||
salt_bootstrap_url: https://bootstrap.saltstack.com
|
||||
salt_bootstrap_options: -X stable <%= version %>
|
||||
log_level: info
|
||||
salt_bootstrap_options: -X -p rsync stable <%= version %>
|
||||
log_level: debug
|
||||
sudo: true
|
||||
require_chef: false
|
||||
retry_on_exit_code:
|
||||
- 139
|
||||
max_retries: 2
|
||||
remote_states:
|
||||
name: git://github.com/saltstack/salt-jenkins.git
|
||||
branch: 2017.7
|
||||
|
@ -40,8 +44,6 @@ provisioner:
|
|||
testingdir: /testing
|
||||
salt_copy_filter:
|
||||
- .bundle
|
||||
- .git
|
||||
- .gitignore
|
||||
- .kitchen
|
||||
- .kitchen.yml
|
||||
- Gemfile
|
||||
|
@ -50,9 +52,25 @@ provisioner:
|
|||
- .travis.yml
|
||||
state_top:
|
||||
base:
|
||||
"os:Windows":
|
||||
- match: grain
|
||||
- prep_windows
|
||||
"*":
|
||||
- git.salt
|
||||
- kitchen
|
||||
pillars:
|
||||
top.sls:
|
||||
base:
|
||||
"*":
|
||||
- jenkins
|
||||
"os:Windows":
|
||||
- match: grain
|
||||
- windows
|
||||
jenkins.sls:
|
||||
testing_dir: "{{salt.config.get('root_dir')|replace('\\', '\\\\')}}/testing"
|
||||
clone_repo: false
|
||||
salttesting_namespec: salttesting==2017.6.1
|
||||
windows.sls:
|
||||
virtualenv_path: 'c:\Python27\Scripts\pip.exe'
|
||||
<% if File.exists?(platformsfile) %>
|
||||
<%= ERB.new(File.read(platformsfile)).result %>
|
||||
<% else %>
|
||||
|
@ -62,7 +80,7 @@ platforms:
|
|||
image: fedora:latest
|
||||
run_command: /usr/lib/systemd/systemd
|
||||
provisioner:
|
||||
salt_bootstrap_options: -X git v<%= version %> >/dev/null
|
||||
salt_bootstrap_options: -X -p rsync git v<%= version %> >/dev/null
|
||||
- name: centos-7
|
||||
driver_config:
|
||||
run_command: /usr/lib/systemd/systemd
|
||||
|
@ -72,7 +90,7 @@ platforms:
|
|||
provision_command:
|
||||
- yum install -y upstart
|
||||
provisioner:
|
||||
salt_bootstrap_options: -P -y -x python2.7 -X git v<%= version %> >/dev/null
|
||||
salt_bootstrap_options: -P -p rsync -y -x python2.7 -X git v<%= version %> >/dev/null
|
||||
- name: ubuntu-rolling
|
||||
driver_config:
|
||||
image: ubuntu:rolling
|
||||
|
@ -106,7 +124,7 @@ platforms:
|
|||
- systemctl enable sshd
|
||||
- echo 'L /run/docker.sock - - - - /docker.sock' > /etc/tmpfiles.d/docker.conf
|
||||
provisioner:
|
||||
salt_bootstrap_options: -X git v<%= version %> >/dev/null
|
||||
salt_bootstrap_options: -X -p rsync git v<%= version %> >/dev/null
|
||||
- name: opensuse
|
||||
driver_config:
|
||||
run_command: /usr/lib/systemd/systemd
|
||||
|
@ -114,80 +132,96 @@ platforms:
|
|||
- systemctl enable sshd.service
|
||||
- echo 'L /run/docker.sock - - - - /docker.sock' > /etc/tmpfiles.d/docker.conf
|
||||
provisioner:
|
||||
salt_bootstrap_options: -X git v<%= version %> >/dev/null
|
||||
salt_bootstrap_options: -X -p rsync git v<%= version %> >/dev/null
|
||||
<% if vagrant != false %>
|
||||
- name: windows-2012r2
|
||||
driver:
|
||||
box: mwrock/Windows2012R2
|
||||
communicator: winrm
|
||||
name: vagrant
|
||||
gui: true
|
||||
username: administrator
|
||||
transport:
|
||||
name: winrm
|
||||
username: Administrator
|
||||
password: Pass@word1
|
||||
provisioner:
|
||||
init_environment: |
|
||||
Clear-Host
|
||||
$AddedLocation ="c:\salt"
|
||||
$Reg = "Registry::HKLM\System\CurrentControlSet\Control\Session Manager\Environment"
|
||||
$OldPath = (Get-ItemProperty -Path "$Reg" -Name PATH).Path
|
||||
$NewPath= $OldPath + ’;’ + $AddedLocation
|
||||
Set-ItemProperty -Path "$Reg" -Name PATH –Value $NewPath
|
||||
salt_bootstrap_url: https://raw.githubusercontent.com/saltstack/salt-bootstrap/develop/bootstrap-salt.ps1
|
||||
salt_bootstrap_options: ''
|
||||
- name: windows-2016
|
||||
driver:
|
||||
box: mwrock/Windows2016
|
||||
communicator: winrm
|
||||
name: vagrant
|
||||
username: Vagrant
|
||||
password: vagrant
|
||||
gui: true
|
||||
provisioner:
|
||||
init_environment: |
|
||||
Clear-Host
|
||||
$AddedLocation ="c:\salt;c:\salt\bin\Scripts"
|
||||
$Reg = "Registry::HKLM\System\CurrentControlSet\Control\Session Manager\Environment"
|
||||
$OldPath = (Get-ItemProperty -Path "$Reg" -Name PATH).Path
|
||||
$NewPath= $OldPath + ’;’ + $AddedLocation
|
||||
Set-ItemProperty -Path "$Reg" -Name PATH –Value $NewPath
|
||||
$OldPath = (Get-ItemProperty -Path $Reg -Name PATH).Path
|
||||
$NewPath= $OldPath + ";" + $AddedLocation
|
||||
Set-ItemProperty -Path $Reg -Value $NewPath -Name PATH
|
||||
salt_bootstrap_url: https://raw.githubusercontent.com/saltstack/salt-bootstrap/develop/bootstrap-salt.ps1
|
||||
salt_bootstrap_options: ''
|
||||
verifier:
|
||||
windows: true
|
||||
types:
|
||||
- unit
|
||||
coverage_xml: false
|
||||
save:
|
||||
$env:TEMP/salt-runtests.log: artifacts/logs/salt-runtests.log
|
||||
/salt/var/log/salt/minion: artifacts/logs/minion
|
||||
- name: windows-2016
|
||||
driver:
|
||||
box: mwrock/Windows2016
|
||||
name: vagrant
|
||||
gui: true
|
||||
transport:
|
||||
name: winrm
|
||||
username: Administrator
|
||||
password: vagrant
|
||||
provisioner:
|
||||
init_environment: |
|
||||
Clear-Host
|
||||
$AddedLocation ="c:\salt;c:\salt\bin\Scripts"
|
||||
$Reg = "Registry::HKLM\System\CurrentControlSet\Control\Session Manager\Environment"
|
||||
$OldPath = (Get-ItemProperty -Path $Reg -Name PATH).Path
|
||||
$NewPath= $OldPath + ";" + $AddedLocation
|
||||
Set-ItemProperty -Path $Reg -Value $NewPath -Name PATH
|
||||
salt_bootstrap_url: https://raw.githubusercontent.com/saltstack/salt-bootstrap/develop/bootstrap-salt.ps1
|
||||
salt_bootstrap_options: ''
|
||||
verifier:
|
||||
windows: true
|
||||
types:
|
||||
- unit
|
||||
coverage_xml: false
|
||||
save:
|
||||
$env:TEMP/salt-runtests.log: artifacts/logs/salt-runtests.log
|
||||
/salt/var/log/salt/minion: artifacts/logs/minion
|
||||
<% end %>
|
||||
<% end %>
|
||||
suites:
|
||||
- name: py2
|
||||
provisioner:
|
||||
pillars:
|
||||
top.sls:
|
||||
base:
|
||||
"*":
|
||||
- jenkins
|
||||
jenkins.sls:
|
||||
testing_dir: /tmp/kitchen/testing
|
||||
clone_repo: false
|
||||
salttesting_namespec: salttesting==2017.6.1
|
||||
verifier:
|
||||
python_bin: python2.7
|
||||
- name: py3
|
||||
excludes:
|
||||
- centos-6
|
||||
- ubuntu-14.04
|
||||
verifier:
|
||||
python_bin: python3
|
||||
provisioner:
|
||||
pillars:
|
||||
top.sls:
|
||||
base:
|
||||
"*":
|
||||
- jenkins
|
||||
jenkins.sls:
|
||||
testing_dir: /tmp/kitchen/testing
|
||||
clone_repo: false
|
||||
py3: true
|
||||
salttesting_namespec: salttesting==2017.6.1
|
||||
verifier:
|
||||
name: shell
|
||||
remote_exec: true
|
||||
sudo: false
|
||||
live_stream: {}
|
||||
<% if ENV['TESTOPTS'].nil? %>
|
||||
command: '$(kitchen) /tmp/kitchen/testing/tests/runtests.py --run-destructive --sysinfo --transport=zeromq --output-columns=80 --ssh --coverage-xml=/tmp/coverage.xml --xml=/tmp/xml-unittests-output'
|
||||
windows.sls:
|
||||
virtualenv_path: 'c:\Python35\Scripts\pip.exe'
|
||||
|
||||
<% if File.exists?(verifierfile) %>
|
||||
<%= ERB.new(File.read(verifierfile)).result %>
|
||||
<% else %>
|
||||
command: '$(kitchen) /tmp/kitchen/testing/tests/runtests.py --run-destructive --output-columns 80 <%= ENV["TESTOPTS"] %>'
|
||||
verifier:
|
||||
name: runtests
|
||||
sudo: true
|
||||
run_destructive: true
|
||||
transport: zeromq
|
||||
types:
|
||||
- ssh
|
||||
xml: /tmp/xml-unittests-output/
|
||||
coverage_xml: /tmp/coverage.xml
|
||||
save:
|
||||
/tmp/xml-unittests-output: artifacts/
|
||||
/tmp/coverage.xml: artifacts/coverage/coverage.xml
|
||||
/tmp/kitchen/var/log/salt/minion: artifacts/logs/minion
|
||||
/tmp/salt-runtests.log: artifacts/logs/salt-runtests.log
|
||||
<% end %>
|
||||
|
|
|
@ -11,7 +11,7 @@ profile=no
|
|||
|
||||
# Add files or directories to the blacklist. They should be base names, not
|
||||
# paths.
|
||||
ignore=CVS
|
||||
ignore=CVS,ext
|
||||
|
||||
# Pickle collected data for later comparisons.
|
||||
persistent=yes
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
# Add files or directories to the blacklist. They should be base names, not
|
||||
# paths.
|
||||
ignore=CVS
|
||||
ignore=CVS,ext
|
||||
|
||||
# Pickle collected data for later comparisons.
|
||||
persistent=no
|
||||
|
@ -29,6 +29,25 @@ load-plugins=saltpylint.pep8,
|
|||
# Don't bump this values on PyLint 1.4.0 - Know bug that ignores the passed --rcfile
|
||||
jobs=1
|
||||
|
||||
# List of blacklisted functions and suggested replacements
|
||||
#
|
||||
# NOTE: This pylint check will infer the full name of the function by walking
|
||||
# back up from the function name to the parent, to the parent's parent, etc.,
|
||||
# and this means that functions which come from platform-specific modules need
|
||||
# to be referenced using name of the module from which the function was
|
||||
# imported. This happens a lot in the os and os.path modules. Functions from
|
||||
# os.path should be defined using posixpath.funcname and ntpath.funcname, while
|
||||
# functions from os should be defined using posix.funcname and nt.funcname.
|
||||
#
|
||||
# When defining a blacklisted function, the format is:
|
||||
#
|
||||
# <func_name>=<suggested_replacement>
|
||||
#
|
||||
# The replacement text will be included in the alert message.
|
||||
#
|
||||
blacklisted-functions=posix.umask=salt.utils.files.set_umask or get_umask,
|
||||
nt.umask=salt.utils.files.set_umask or get_umask
|
||||
|
||||
# Allow loading of arbitrary C extensions. Extensions are imported into the
|
||||
# active Python interpreter and may run arbitrary code.
|
||||
unsafe-load-any-extension=no
|
||||
|
|
10
Gemfile
10
Gemfile
|
@ -2,7 +2,7 @@
|
|||
|
||||
source 'https://rubygems.org'
|
||||
|
||||
gem 'test-kitchen'
|
||||
gem 'test-kitchen', '~>1.20'
|
||||
gem 'kitchen-salt', :git => 'https://github.com/saltstack/kitchen-salt.git'
|
||||
gem 'kitchen-sync'
|
||||
gem 'git'
|
||||
|
@ -12,7 +12,7 @@ group :docker do
|
|||
end
|
||||
|
||||
group :opennebula do
|
||||
gem 'kitchen-opennebula', :git => 'https://github.com/gtmanfred/kitchen-opennebula.git'
|
||||
gem 'kitchen-opennebula', '>=0.2.3'
|
||||
gem 'xmlrpc'
|
||||
end
|
||||
|
||||
|
@ -20,5 +20,9 @@ group :windows do
|
|||
gem 'vagrant-wrapper'
|
||||
gem 'kitchen-vagrant'
|
||||
gem 'winrm', '~>2.0'
|
||||
gem 'winrm-fs', '~>1.0'
|
||||
gem 'winrm-fs', '>=1.1.1'
|
||||
end
|
||||
|
||||
group :ec2 do
|
||||
gem 'kitchen-ec2'
|
||||
end
|
||||
|
|
|
@ -67,8 +67,8 @@ Engage SaltStack
|
|||
|
||||
`SaltConf`_, **User Groups and Meetups** - SaltStack has a vibrant and `global
|
||||
community`_ of customers, users, developers and enthusiasts. Connect with other
|
||||
Salted folks in your area of the world, or join `SaltConf16`_, the SaltStack
|
||||
annual user conference, April 19-21 in Salt Lake City. Please let us know if
|
||||
Salted folks in your area of the world, or join `SaltConf18`_, the SaltStack
|
||||
annual user conference, September 10-14 in Salt Lake City. Please let us know if
|
||||
you would like to start a user group or if we should add your existing
|
||||
SaltStack user group to this list by emailing: info@saltstack.com
|
||||
|
||||
|
@ -91,7 +91,7 @@ services`_ offerings.
|
|||
|
||||
.. _SaltConf: http://www.youtube.com/user/saltstack
|
||||
.. _global community: http://www.meetup.com/pro/saltstack/
|
||||
.. _SaltConf16: http://saltconf.com/
|
||||
.. _SaltConf18: http://saltconf.com/
|
||||
.. _SaltStack education offerings: http://saltstack.com/training/
|
||||
.. _SaltStack Certified Engineer (SSCE): http://saltstack.com/certification/
|
||||
.. _SaltStack professional services: http://saltstack.com/services/
|
||||
|
|
|
@ -235,13 +235,13 @@
|
|||
# cause sub minion process to restart.
|
||||
#auth_safemode: False
|
||||
|
||||
# Ping Master to ensure connection is alive (seconds).
|
||||
# Ping Master to ensure connection is alive (minutes).
|
||||
#ping_interval: 0
|
||||
|
||||
# To auto recover minions if master changes IP address (DDNS)
|
||||
# auth_tries: 10
|
||||
# auth_safemode: False
|
||||
# ping_interval: 90
|
||||
# ping_interval: 2
|
||||
#
|
||||
# Minions won't know master is missing until a ping fails. After the ping fail,
|
||||
# the minion will attempt authentication and likely fails out and cause a restart.
|
||||
|
|
BIN
doc/_themes/saltstack2/static/images/DOCBANNER.jpg
vendored
BIN
doc/_themes/saltstack2/static/images/DOCBANNER.jpg
vendored
Binary file not shown.
Before Width: | Height: | Size: 438 KiB After Width: | Height: | Size: 240 KiB |
Binary file not shown.
Before Width: | Height: | Size: 739 KiB After Width: | Height: | Size: 109 KiB |
28
doc/conf.py
28
doc/conf.py
|
@ -46,6 +46,8 @@ class Mock(object):
|
|||
data = self.__mapping.get(name)
|
||||
elif name in ('__file__', '__path__'):
|
||||
data = '/dev/null'
|
||||
elif name == '__qualname__':
|
||||
raise AttributeError("'Mock' object has no attribute '__qualname__'")
|
||||
else:
|
||||
data = Mock(mapping=self.__mapping)
|
||||
return data
|
||||
|
@ -158,6 +160,7 @@ MOCK_MODULES = [
|
|||
'jnpr.junos.utils.sw',
|
||||
'dns',
|
||||
'dns.resolver',
|
||||
'keyring',
|
||||
'netaddr',
|
||||
'netaddr.IPAddress',
|
||||
'netaddr.core',
|
||||
|
@ -199,6 +202,8 @@ def mock_decorator_with_params(*oargs, **okwargs):
|
|||
|
||||
# Define a fake version attribute for the following libs.
|
||||
sys.modules['libcloud'].__version__ = '0.0.0'
|
||||
sys.modules['msgpack'].version = (1, 0, 0)
|
||||
sys.modules['psutil'].version_info = (3, 0, 0)
|
||||
sys.modules['pymongo'].version = '0.0.0'
|
||||
sys.modules['ntsecuritycon'].STANDARD_RIGHTS_REQUIRED = 0
|
||||
sys.modules['ntsecuritycon'].SYNCHRONIZE = 0
|
||||
|
@ -245,9 +250,9 @@ on_saltstack = 'SALT_ON_SALTSTACK' in os.environ
|
|||
project = 'Salt'
|
||||
|
||||
version = salt.version.__version__
|
||||
latest_release = '2017.7.2' # latest release
|
||||
previous_release = '2016.11.8' # latest release from previous branch
|
||||
previous_release_dir = '2016.11' # path on web server for previous branch
|
||||
latest_release = '2018.3.0' # latest release
|
||||
previous_release = '2017.7.5' # latest release from previous branch
|
||||
previous_release_dir = '2017.7' # path on web server for previous branch
|
||||
next_release = '' # next release
|
||||
next_release_dir = '' # path on web server for next release branch
|
||||
|
||||
|
@ -258,8 +263,8 @@ if on_saltstack:
|
|||
copyright = time.strftime("%Y")
|
||||
|
||||
# < --- START do not merge these settings to other branches START ---> #
|
||||
build_type = 'latest' # latest, previous, develop, next
|
||||
release = latest_release # version, latest_release, previous_release
|
||||
build_type = 'previous' # latest, previous, develop, next
|
||||
release = previous_release # version, latest_release, previous_release
|
||||
# < --- END do not merge these settings to other branches END ---> #
|
||||
|
||||
# Set google custom search engine
|
||||
|
@ -336,10 +341,15 @@ rst_prolog = """\
|
|||
| <a href="https://repo.saltstack.com/windows/Salt-Minion-{release}-Py3-AMD64-Setup.exe.md5"><strong>md5</strong></a></p>
|
||||
|
||||
|
||||
.. |osxdownload| raw:: html
|
||||
.. |osxdownloadpy2| raw:: html
|
||||
|
||||
<p>x86_64: <a href="https://repo.saltstack.com/osx/salt-{release}-x86_64.pkg"><strong>salt-{release}-x86_64.pkg</strong></a>
|
||||
| <a href="https://repo.saltstack.com/osx/salt-{release}-x86_64.pkg.md5"><strong>md5</strong></a></p>
|
||||
<p>x86_64: <a href="https://repo.saltstack.com/osx/salt-{release}-py2-x86_64.pkg"><strong>salt-{release}-py2-x86_64.pkg</strong></a>
|
||||
| <a href="https://repo.saltstack.com/osx/salt-{release}-py2-x86_64.pkg.md5"><strong>md5</strong></a></p>
|
||||
|
||||
.. |osxdownloadpy3| raw:: html
|
||||
|
||||
<p>x86_64: <a href="https://repo.saltstack.com/osx/salt-{release}-py3-x86_64.pkg"><strong>salt-{release}-py3-x86_64.pkg</strong></a>
|
||||
| <a href="https://repo.saltstack.com/osx/salt-{release}-py3-x86_64.pkg.md5"><strong>md5</strong></a></p>
|
||||
|
||||
""".format(release=release)
|
||||
|
||||
|
@ -360,7 +370,7 @@ gettext_compact = False
|
|||
|
||||
|
||||
### HTML options
|
||||
html_theme = 'saltstack2' #change to 'saltstack' to use previous theme
|
||||
html_theme = os.environ.get('HTML_THEME', 'saltstack2') # set 'HTML_THEME=saltstack' to use previous theme
|
||||
html_theme_path = ['_themes']
|
||||
html_title = u''
|
||||
html_short_title = 'Salt'
|
||||
|
|
35
doc/faq.rst
35
doc/faq.rst
|
@ -254,17 +254,19 @@ specifying the pillar variable is the same one used for :py:func:`pillar.get
|
|||
<salt.states.file.managed>` state is only supported in Salt 2015.8.4 and
|
||||
newer.
|
||||
|
||||
.. _faq-restart-salt-minion:
|
||||
|
||||
What is the best way to restart a Salt Minion daemon using Salt after upgrade?
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
Updating the ``salt-minion`` package requires a restart of the ``salt-minion``
|
||||
service. But restarting the service while in the middle of a state run
|
||||
interrupts the process of the Minion running states and sending results back to
|
||||
the Master. A common way to workaround that is to schedule restarting of the
|
||||
Minion service using :ref:`masterless mode <masterless-quickstart>` after all
|
||||
other states have been applied. This allows the minion to keep Minion to Master
|
||||
connection alive for the Minion to report the final results to the Master, while
|
||||
the service is restarting in the background.
|
||||
the Master. A common way to workaround that is to schedule restarting the
|
||||
Minion service in the background by issuing a ``salt-call`` command calling
|
||||
``service.restart`` function. This prevents the Minion being disconnected from
|
||||
the Master immediately. Otherwise you would get
|
||||
``Minion did not return. [Not connected]`` message as the result of a state run.
|
||||
|
||||
Upgrade without automatic restart
|
||||
*********************************
|
||||
|
@ -328,7 +330,7 @@ The following example works on UNIX-like operating systems:
|
|||
{%- if grains['os'] != 'Windows' %
|
||||
Restart Salt Minion:
|
||||
cmd.run:
|
||||
- name: 'salt-call --local service.restart salt-minion'
|
||||
- name: 'salt-call service.restart salt-minion'
|
||||
- bg: True
|
||||
- onchanges:
|
||||
- pkg: Upgrade Salt Minion
|
||||
|
@ -348,9 +350,9 @@ as follows:
|
|||
Restart Salt Minion:
|
||||
cmd.run:
|
||||
{%- if grains['kernel'] == 'Windows' %}
|
||||
- name: 'C:\salt\salt-call.bat --local service.restart salt-minion'
|
||||
- name: 'C:\salt\salt-call.bat service.restart salt-minion'
|
||||
{%- else %}
|
||||
- name: 'salt-call --local service.restart salt-minion'
|
||||
- name: 'salt-call service.restart salt-minion'
|
||||
{%- endif %}
|
||||
- bg: True
|
||||
- onchanges:
|
||||
|
@ -358,7 +360,13 @@ as follows:
|
|||
|
||||
However, it requires more advanced tricks to upgrade from legacy version of
|
||||
Salt (before ``2016.3.0``) on UNIX-like operating systems, where executing
|
||||
commands in the background is not supported:
|
||||
commands in the background is not supported. You also may need to schedule
|
||||
restarting the Minion service using :ref:`masterless mode
|
||||
<masterless-quickstart>` after all other states have been applied for Salt
|
||||
versions earlier than ``2016.11.0``. This allows the Minion to keep the
|
||||
connection to the Master alive for being able to report the final results back
|
||||
to the Master, while the service is restarting in the background. This state
|
||||
should run last or watch for the ``pkg`` state changes:
|
||||
|
||||
.. code-block:: jinja
|
||||
|
||||
|
@ -382,8 +390,8 @@ Restart the Minion from the command line:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
salt -G kernel:Windows cmd.run_bg 'C:\salt\salt-call.bat --local service.restart salt-minion'
|
||||
salt -C 'not G@kernel:Windows' cmd.run_bg 'salt-call --local service.restart salt-minion'
|
||||
salt -G kernel:Windows cmd.run_bg 'C:\salt\salt-call.bat service.restart salt-minion'
|
||||
salt -C 'not G@kernel:Windows' cmd.run_bg 'salt-call service.restart salt-minion'
|
||||
|
||||
Salting the Salt Master
|
||||
-----------------------
|
||||
|
@ -409,6 +417,10 @@ for salt itself:
|
|||
|
||||
https://github.com/saltstack-formulas/salt-formula
|
||||
|
||||
Restarting the ``salt-master`` service using execution module or application of
|
||||
state could be done the same way as for the Salt minion described :ref:`above
|
||||
<faq-restart-salt-minion>`.
|
||||
|
||||
.. _faq-grain-security:
|
||||
|
||||
Is Targeting using Grain Data Secure?
|
||||
|
@ -443,4 +455,3 @@ the grain and values that you want to change / set.)
|
|||
|
||||
You should also `file an issue <https://github.com/saltstack/salt/issues>`_
|
||||
describing the change so it can be fixed in Salt.
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "SALT-API" "1" "October 31, 2016" "2016.11.0" "Salt"
|
||||
.TH "SALT-API" "1" "Mar 13, 2018" "2017.7.5" "Salt"
|
||||
.SH NAME
|
||||
salt-api \- salt-api Command
|
||||
.
|
||||
|
@ -103,12 +103,10 @@ Logfile logging log level. One of \fBall\fP, \fBgarbage\fP, \fBtrace\fP,
|
|||
.UNINDENT
|
||||
.SH SEE ALSO
|
||||
.sp
|
||||
\fIsalt\-api(7)\fP
|
||||
\fIsalt(7)\fP
|
||||
\fIsalt\-master(1)\fP
|
||||
\fBsalt\-api(7)\fP
|
||||
\fBsalt(7)\fP
|
||||
\fBsalt\-master(1)\fP
|
||||
.SH AUTHOR
|
||||
Thomas S. Hatch <thatch45@gmail.com> and many others, please see the Authors file
|
||||
.SH COPYRIGHT
|
||||
2016 SaltStack, Inc.
|
||||
.\" Generated by docutils manpage writer.
|
||||
.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "SALT-CALL" "1" "October 31, 2016" "2016.11.0" "Salt"
|
||||
.TH "SALT-CALL" "1" "Mar 13, 2018" "2017.7.5" "Salt"
|
||||
.SH NAME
|
||||
salt-call \- salt-call Documentation
|
||||
.
|
||||
|
@ -227,6 +227,11 @@ Write the output to the specified file.
|
|||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-\-out\-file\-append, \-\-output\-file\-append
|
||||
Append the output to the specified file.
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-\-no\-color
|
||||
Disable all colored output
|
||||
.UNINDENT
|
||||
|
@ -245,14 +250,25 @@ changes and success and \fByellow\fP denotes a expected future change in configu
|
|||
.UNINDENT
|
||||
.UNINDENT
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-\-state\-output=STATE_OUTPUT, \-\-state_output=STATE_OUTPUT
|
||||
Override the configured state_output value for minion
|
||||
output. One of \(aqfull\(aq, \(aqterse\(aq, \(aqmixed\(aq, \(aqchanges\(aq or
|
||||
\(aqfilter\(aq. Default: \(aqnone\(aq.
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-\-state\-verbose=STATE_VERBOSE, \-\-state_verbose=STATE_VERBOSE
|
||||
Override the configured state_verbose value for minion
|
||||
output. Set to True or False. Default: none.
|
||||
.UNINDENT
|
||||
.SH SEE ALSO
|
||||
.sp
|
||||
\fIsalt(1)\fP
|
||||
\fIsalt\-master(1)\fP
|
||||
\fIsalt\-minion(1)\fP
|
||||
\fBsalt(1)\fP
|
||||
\fBsalt\-master(1)\fP
|
||||
\fBsalt\-minion(1)\fP
|
||||
.SH AUTHOR
|
||||
Thomas S. Hatch <thatch45@gmail.com> and many others, please see the Authors file
|
||||
.SH COPYRIGHT
|
||||
2016 SaltStack, Inc.
|
||||
.\" Generated by docutils manpage writer.
|
||||
.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "SALT-CLOUD" "1" "October 31, 2016" "2016.11.0" "Salt"
|
||||
.TH "SALT-CLOUD" "1" "Mar 13, 2018" "2017.7.5" "Salt"
|
||||
.SH NAME
|
||||
salt-cloud \- Salt Cloud Command
|
||||
.
|
||||
|
@ -276,6 +276,11 @@ Write the output to the specified file.
|
|||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-\-out\-file\-append, \-\-output\-file\-append
|
||||
Append the output to the specified file.
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-\-no\-color
|
||||
Disable all colored output
|
||||
.UNINDENT
|
||||
|
@ -294,6 +299,19 @@ changes and success and \fByellow\fP denotes a expected future change in configu
|
|||
.UNINDENT
|
||||
.UNINDENT
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-\-state\-output=STATE_OUTPUT, \-\-state_output=STATE_OUTPUT
|
||||
Override the configured state_output value for minion
|
||||
output. One of \(aqfull\(aq, \(aqterse\(aq, \(aqmixed\(aq, \(aqchanges\(aq or
|
||||
\(aqfilter\(aq. Default: \(aqnone\(aq.
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-\-state\-verbose=STATE_VERBOSE, \-\-state_verbose=STATE_VERBOSE
|
||||
Override the configured state_verbose value for minion
|
||||
output. Set to True or False. Default: none.
|
||||
.UNINDENT
|
||||
.SH EXAMPLES
|
||||
.sp
|
||||
To create 4 VMs named web1, web2, db1, and db2 from specified profiles:
|
||||
|
@ -369,13 +387,11 @@ salt\-cloud \-m /path/to/cloud.map \-Q
|
|||
.UNINDENT
|
||||
.SH SEE ALSO
|
||||
.sp
|
||||
\fIsalt\-cloud(7)\fP
|
||||
\fIsalt(7)\fP
|
||||
\fIsalt\-master(1)\fP
|
||||
\fIsalt\-minion(1)\fP
|
||||
\fBsalt\-cloud(7)\fP
|
||||
\fBsalt(7)\fP
|
||||
\fBsalt\-master(1)\fP
|
||||
\fBsalt\-minion(1)\fP
|
||||
.SH AUTHOR
|
||||
Thomas S. Hatch <thatch45@gmail.com> and many others, please see the Authors file
|
||||
.SH COPYRIGHT
|
||||
2016 SaltStack, Inc.
|
||||
.\" Generated by docutils manpage writer.
|
||||
.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "SALT-CP" "1" "October 31, 2016" "2016.11.0" "Salt"
|
||||
.TH "SALT-CP" "1" "Mar 13, 2018" "2017.7.5" "Salt"
|
||||
.SH NAME
|
||||
salt-cp \- salt-cp Documentation
|
||||
.
|
||||
|
@ -31,34 +31,55 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
|||
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
|
||||
..
|
||||
.sp
|
||||
Copy a file to a set of systems
|
||||
Copy a file or files to one or more minions
|
||||
.SH SYNOPSIS
|
||||
.INDENT 0.0
|
||||
.INDENT 3.5
|
||||
.sp
|
||||
.nf
|
||||
.ft C
|
||||
salt\-cp \(aq*\(aq [ options ] SOURCE DEST
|
||||
salt\-cp \(aq*\(aq [ options ] SOURCE [SOURCE2 SOURCE3 ...] DEST
|
||||
|
||||
salt\-cp \-E \(aq.*\(aq [ options ] SOURCE DEST
|
||||
salt\-cp \-E \(aq.*\(aq [ options ] SOURCE [SOURCE2 SOURCE3 ...] DEST
|
||||
|
||||
salt\-cp \-G \(aqos:Arch.*\(aq [ options ] SOURCE DEST
|
||||
salt\-cp \-G \(aqos:Arch.*\(aq [ options ] SOURCE [SOURCE2 SOURCE3 ...] DEST
|
||||
.ft P
|
||||
.fi
|
||||
.UNINDENT
|
||||
.UNINDENT
|
||||
.SH DESCRIPTION
|
||||
.sp
|
||||
Salt copy copies a local file out to all of the Salt minions matched by the
|
||||
given target.
|
||||
salt\-cp copies files from the master to all of the Salt minions matched by the
|
||||
specified target expression.
|
||||
.sp
|
||||
Salt copy is only intended for use with small files (< 100KB). If you need
|
||||
to copy large files out to minions please use the cp.get_file function.
|
||||
.sp
|
||||
Note: salt\-cp uses salt\(aqs publishing mechanism. This means the privacy of the
|
||||
\fBNOTE:\fP
|
||||
.INDENT 0.0
|
||||
.INDENT 3.5
|
||||
salt\-cp uses Salt\(aqs publishing mechanism. This means the privacy of the
|
||||
contents of the file on the wire is completely dependent upon the transport
|
||||
in use. In addition, if the salt\-master is running with debug logging it is
|
||||
possible that the contents of the file will be logged to disk.
|
||||
in use. In addition, if the master or minion is running with debug logging,
|
||||
the contents of the file will be logged to disk.
|
||||
.sp
|
||||
In addition, this tool is less efficient than the Salt fileserver when
|
||||
copying larger files. It is recommended to instead use
|
||||
\fBcp.get_file\fP to copy larger files to
|
||||
minions. However, this requires the file to be located within one of the
|
||||
fileserver directories.
|
||||
.UNINDENT
|
||||
.UNINDENT
|
||||
.sp
|
||||
Changed in version 2016.3.7,2016.11.6,2017.7.0: Compression support added, disable with \fB\-n\fP\&. Also, if the destination
|
||||
path ends in a path separator (i.e. \fB/\fP, or \fB\e\fP on Windows, the
|
||||
desitination will be assumed to be a directory. Finally, recursion is now
|
||||
supported, allowing for entire directories to be copied.
|
||||
|
||||
.sp
|
||||
Changed in version 2016.11.7,2017.7.2: Reverted back to the old copy mode to preserve backward compatibility. The
|
||||
new functionality added in 2016.6.6 and 2017.7.0 is now available using the
|
||||
\fB\-C\fP or \fB\-\-chunked\fP CLI arguments. Note that compression, recursive
|
||||
copying, and support for copying large files is only available in chunked
|
||||
mode.
|
||||
|
||||
.SH OPTIONS
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
|
@ -160,15 +181,30 @@ to identify targets. Range expressions look like %cluster.
|
|||
Using the Range option requires that a range server is set up and the
|
||||
location of the range server is referenced in the master configuration
|
||||
file.
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-C, \-\-chunked
|
||||
Use new chunked mode to copy files. This mode supports large files, recursive
|
||||
directories copying and compression.
|
||||
.sp
|
||||
New in version 2016.11.7,2017.7.2.
|
||||
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-n, \-\-no\-compression
|
||||
Disable gzip compression in chunked mode.
|
||||
.sp
|
||||
New in version 2016.3.7,2016.11.6,2017.7.0.
|
||||
|
||||
.UNINDENT
|
||||
.SH SEE ALSO
|
||||
.sp
|
||||
\fIsalt(1)\fP
|
||||
\fIsalt\-master(1)\fP
|
||||
\fIsalt\-minion(1)\fP
|
||||
\fBsalt(1)\fP
|
||||
\fBsalt\-master(1)\fP
|
||||
\fBsalt\-minion(1)\fP
|
||||
.SH AUTHOR
|
||||
Thomas S. Hatch <thatch45@gmail.com> and many others, please see the Authors file
|
||||
.SH COPYRIGHT
|
||||
2016 SaltStack, Inc.
|
||||
.\" Generated by docutils manpage writer.
|
||||
.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "SALT-KEY" "1" "October 31, 2016" "2016.11.0" "Salt"
|
||||
.TH "SALT-KEY" "1" "Mar 13, 2018" "2017.7.5" "Salt"
|
||||
.SH NAME
|
||||
salt-key \- salt-key Documentation
|
||||
.
|
||||
|
@ -182,6 +182,11 @@ Write the output to the specified file.
|
|||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-\-out\-file\-append, \-\-output\-file\-append
|
||||
Append the output to the specified file.
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-\-no\-color
|
||||
Disable all colored output
|
||||
.UNINDENT
|
||||
|
@ -200,6 +205,19 @@ changes and success and \fByellow\fP denotes a expected future change in configu
|
|||
.UNINDENT
|
||||
.UNINDENT
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-\-state\-output=STATE_OUTPUT, \-\-state_output=STATE_OUTPUT
|
||||
Override the configured state_output value for minion
|
||||
output. One of \(aqfull\(aq, \(aqterse\(aq, \(aqmixed\(aq, \(aqchanges\(aq or
|
||||
\(aqfilter\(aq. Default: \(aqnone\(aq.
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-\-state\-verbose=STATE_VERBOSE, \-\-state_verbose=STATE_VERBOSE
|
||||
Override the configured state_verbose value for minion
|
||||
output. Set to True or False. Default: none.
|
||||
.UNINDENT
|
||||
.SS Actions
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
|
@ -322,12 +340,10 @@ Auto\-create a signing key\-pair if it does not yet exist
|
|||
.UNINDENT
|
||||
.SH SEE ALSO
|
||||
.sp
|
||||
\fIsalt(7)\fP
|
||||
\fIsalt\-master(1)\fP
|
||||
\fIsalt\-minion(1)\fP
|
||||
\fBsalt(7)\fP
|
||||
\fBsalt\-master(1)\fP
|
||||
\fBsalt\-minion(1)\fP
|
||||
.SH AUTHOR
|
||||
Thomas S. Hatch <thatch45@gmail.com> and many others, please see the Authors file
|
||||
.SH COPYRIGHT
|
||||
2016 SaltStack, Inc.
|
||||
.\" Generated by docutils manpage writer.
|
||||
.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "SALT-MASTER" "1" "October 31, 2016" "2016.11.0" "Salt"
|
||||
.TH "SALT-MASTER" "1" "Mar 13, 2018" "2017.7.5" "Salt"
|
||||
.SH NAME
|
||||
salt-master \- salt-master Documentation
|
||||
.
|
||||
|
@ -108,12 +108,10 @@ Logfile logging log level. One of \fBall\fP, \fBgarbage\fP, \fBtrace\fP,
|
|||
.UNINDENT
|
||||
.SH SEE ALSO
|
||||
.sp
|
||||
\fIsalt(1)\fP
|
||||
\fIsalt(7)\fP
|
||||
\fIsalt\-minion(1)\fP
|
||||
\fBsalt(1)\fP
|
||||
\fBsalt(7)\fP
|
||||
\fBsalt\-minion(1)\fP
|
||||
.SH AUTHOR
|
||||
Thomas S. Hatch <thatch45@gmail.com> and many others, please see the Authors file
|
||||
.SH COPYRIGHT
|
||||
2016 SaltStack, Inc.
|
||||
.\" Generated by docutils manpage writer.
|
||||
.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "SALT-MINION" "1" "October 31, 2016" "2016.11.0" "Salt"
|
||||
.TH "SALT-MINION" "1" "Mar 13, 2018" "2017.7.5" "Salt"
|
||||
.SH NAME
|
||||
salt-minion \- salt-minion Documentation
|
||||
.
|
||||
|
@ -109,12 +109,10 @@ Logfile logging log level. One of \fBall\fP, \fBgarbage\fP, \fBtrace\fP,
|
|||
.UNINDENT
|
||||
.SH SEE ALSO
|
||||
.sp
|
||||
\fIsalt(1)\fP
|
||||
\fIsalt(7)\fP
|
||||
\fIsalt\-master(1)\fP
|
||||
\fBsalt(1)\fP
|
||||
\fBsalt(7)\fP
|
||||
\fBsalt\-master(1)\fP
|
||||
.SH AUTHOR
|
||||
Thomas S. Hatch <thatch45@gmail.com> and many others, please see the Authors file
|
||||
.SH COPYRIGHT
|
||||
2016 SaltStack, Inc.
|
||||
.\" Generated by docutils manpage writer.
|
||||
.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "SALT-PROXY" "1" "October 31, 2016" "2016.11.0" "Salt"
|
||||
.TH "SALT-PROXY" "1" "Mar 13, 2018" "2017.7.5" "Salt"
|
||||
.SH NAME
|
||||
salt-proxy \- salt-proxy Documentation
|
||||
.
|
||||
|
@ -116,13 +116,11 @@ Logfile logging log level. One of \fBall\fP, \fBgarbage\fP, \fBtrace\fP,
|
|||
.UNINDENT
|
||||
.SH SEE ALSO
|
||||
.sp
|
||||
\fIsalt(1)\fP
|
||||
\fIsalt(7)\fP
|
||||
\fIsalt\-master(1)\fP
|
||||
\fIsalt\-minion(1)\fP
|
||||
\fBsalt(1)\fP
|
||||
\fBsalt(7)\fP
|
||||
\fBsalt\-master(1)\fP
|
||||
\fBsalt\-minion(1)\fP
|
||||
.SH AUTHOR
|
||||
Thomas S. Hatch <thatch45@gmail.com> and many others, please see the Authors file
|
||||
.SH COPYRIGHT
|
||||
2016 SaltStack, Inc.
|
||||
.\" Generated by docutils manpage writer.
|
||||
.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "SALT-RUN" "1" "October 31, 2016" "2016.11.0" "Salt"
|
||||
.TH "SALT-RUN" "1" "Mar 13, 2018" "2017.7.5" "Salt"
|
||||
.SH NAME
|
||||
salt-run \- salt-run Documentation
|
||||
.
|
||||
|
@ -114,12 +114,10 @@ Logfile logging log level. One of \fBall\fP, \fBgarbage\fP, \fBtrace\fP,
|
|||
.UNINDENT
|
||||
.SH SEE ALSO
|
||||
.sp
|
||||
\fIsalt(1)\fP
|
||||
\fIsalt\-master(1)\fP
|
||||
\fIsalt\-minion(1)\fP
|
||||
\fBsalt(1)\fP
|
||||
\fBsalt\-master(1)\fP
|
||||
\fBsalt\-minion(1)\fP
|
||||
.SH AUTHOR
|
||||
Thomas S. Hatch <thatch45@gmail.com> and many others, please see the Authors file
|
||||
.SH COPYRIGHT
|
||||
2016 SaltStack, Inc.
|
||||
.\" Generated by docutils manpage writer.
|
||||
.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "SALT-SSH" "1" "October 31, 2016" "2016.11.0" "Salt"
|
||||
.TH "SALT-SSH" "1" "Mar 13, 2018" "2017.7.5" "Salt"
|
||||
.SH NAME
|
||||
salt-ssh \- salt-ssh Documentation
|
||||
.
|
||||
|
@ -49,13 +49,35 @@ Salt SSH allows for salt routines to be executed using only SSH for transport
|
|||
.SH OPTIONS
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-r, \-\-raw, \-\-raw\-shell
|
||||
Execute a raw shell command.
|
||||
.B \-\-version
|
||||
Print the version of Salt that is running.
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-\-priv
|
||||
Specify the SSH private key file to be used for authentication.
|
||||
.B \-\-versions\-report
|
||||
Show program\(aqs dependencies and version number, and then exit
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-h, \-\-help
|
||||
Show the help message and exit
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-c CONFIG_DIR, \-\-config\-dir=CONFIG_dir
|
||||
The location of the Salt configuration directory. This directory contains
|
||||
the configuration files for Salt master and minions. The default location
|
||||
on most systems is \fB/etc/salt\fP\&.
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-\-hard\-crash
|
||||
Raise any original exception rather than exiting gracefully. Default: False.
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-r, \-\-raw, \-\-raw\-shell
|
||||
Execute a raw shell command.
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
|
@ -90,9 +112,74 @@ is 25.
|
|||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-\-extra\-filerefs=EXTRA_FILEREFS
|
||||
Pass in extra files to include in the state tarball.
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-\-min\-extra\-modules=MIN_EXTRA_MODS
|
||||
One or comma\-separated list of extra Python modulesto be included
|
||||
into Minimal Salt.
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-\-thin\-extra\-modules=THIN_EXTRA_MODS
|
||||
One or comma\-separated list of extra Python modulesto be included
|
||||
into Thin Salt.
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-v, \-\-verbose
|
||||
Turn on command verbosity, display jid.
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-s, \-\-static
|
||||
Return the data from minions as a group after they all return.
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-w, \-\-wipe
|
||||
Remove the deployment of the salt files when done executing.
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-W, \-\-rand\-thin\-dir
|
||||
Select a random temp dir to deploy on the remote system. The dir
|
||||
will be cleaned after the execution.
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-t, \-\-regen\-thin, \-\-thin
|
||||
Trigger a thin tarball regeneration. This is needed if custom
|
||||
grains/modules/states have been added or updated.
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-\-python2\-bin=PYTHON2_BIN
|
||||
Path to a python2 binary which has salt installed.
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-\-python3\-bin=PYTHON3_BIN
|
||||
Path to a python3 binary which has salt installed.
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-\-jid=JID
|
||||
Pass a JID to be used instead of generating one.
|
||||
.UNINDENT
|
||||
.SS Authentication Options
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-\-priv=SSH_PRIV
|
||||
Specify the SSH private key file to be used for authentication.
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-i, \-\-ignore\-host\-keys
|
||||
Disables StrictHostKeyChecking to relax acceptance of new and unknown
|
||||
host keys.
|
||||
By default ssh host keys are honored and connections will ask for
|
||||
approval. Use this option to disable StrictHostKeyChecking.
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
|
@ -103,11 +190,22 @@ changed and would still error with \-\-ignore\-host\-keys.
|
|||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-\-user=SSH_USER
|
||||
Set the default user to attempt to use when authenticating.
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-\-passwd
|
||||
Set the default password to attempt to use when authenticating.
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-\-askpass
|
||||
Interactively ask for the SSH password with no echo \- avoids password
|
||||
in process args and stored in history.
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-\-key\-deploy
|
||||
Set this flag to attempt to deploy the authorized ssh key with all
|
||||
minions. This combined with \-\-passwd can make initial deployment of keys
|
||||
|
@ -115,35 +213,25 @@ very fast and easy.
|
|||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-\-version
|
||||
Print the version of Salt that is running.
|
||||
.B \-\-identities\-only
|
||||
Use the only authentication identity files configured in the ssh_config
|
||||
files. See IdentitiesOnly flag in man ssh_config.
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-\-versions\-report
|
||||
Show program\(aqs dependencies and version number, and then exit
|
||||
.B \-\-sudo
|
||||
Run command via sudo.
|
||||
.UNINDENT
|
||||
.SS Scan Roster Options
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-\-scan\-ports=SSH_SCAN_PORTS
|
||||
Comma\-separated list of ports to scan in the scan roster.
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-h, \-\-help
|
||||
Show the help message and exit
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-c CONFIG_DIR, \-\-config\-dir=CONFIG_dir
|
||||
The location of the Salt configuration directory. This directory contains
|
||||
the configuration files for Salt master and minions. The default location
|
||||
on most systems is \fB/etc/salt\fP\&.
|
||||
.UNINDENT
|
||||
.SS Target Selection
|
||||
.sp
|
||||
The default matching that Salt utilizes is shell\-style globbing around the
|
||||
minion id. See \fI\%https://docs.python.org/2/library/fnmatch.html#module\-fnmatch\fP\&.
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-E, \-\-pcre
|
||||
The target expression will be interpreted as a PCRE regular expression
|
||||
rather than a shell glob.
|
||||
.B \-\-scan\-timeout=SSH_SCAN_TIMEOUT
|
||||
Scanning socket timeout for the scan roster.
|
||||
.UNINDENT
|
||||
.SS Logging Options
|
||||
.sp
|
||||
|
@ -167,6 +255,16 @@ Logfile logging log level. One of \fBall\fP, \fBgarbage\fP, \fBtrace\fP,
|
|||
\fBdebug\fP, \fBinfo\fP, \fBwarning\fP, \fBerror\fP, \fBquiet\fP\&. Default:
|
||||
\fBwarning\fP\&.
|
||||
.UNINDENT
|
||||
.SS Target Selection
|
||||
.sp
|
||||
The default matching that Salt utilizes is shell\-style globbing around the
|
||||
minion id. See \fI\%https://docs.python.org/2/library/fnmatch.html#module\-fnmatch\fP\&.
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-E, \-\-pcre
|
||||
The target expression will be interpreted as a PCRE regular expression
|
||||
rather than a shell glob.
|
||||
.UNINDENT
|
||||
.SS Output Options
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
|
@ -212,6 +310,11 @@ Write the output to the specified file.
|
|||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-\-out\-file\-append, \-\-output\-file\-append
|
||||
Append the output to the specified file.
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-\-no\-color
|
||||
Disable all colored output
|
||||
.UNINDENT
|
||||
|
@ -230,14 +333,25 @@ changes and success and \fByellow\fP denotes a expected future change in configu
|
|||
.UNINDENT
|
||||
.UNINDENT
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-\-state\-output=STATE_OUTPUT, \-\-state_output=STATE_OUTPUT
|
||||
Override the configured state_output value for minion
|
||||
output. One of \(aqfull\(aq, \(aqterse\(aq, \(aqmixed\(aq, \(aqchanges\(aq or
|
||||
\(aqfilter\(aq. Default: \(aqnone\(aq.
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-\-state\-verbose=STATE_VERBOSE, \-\-state_verbose=STATE_VERBOSE
|
||||
Override the configured state_verbose value for minion
|
||||
output. Set to True or False. Default: none.
|
||||
.UNINDENT
|
||||
.SH SEE ALSO
|
||||
.sp
|
||||
\fIsalt(7)\fP
|
||||
\fIsalt\-master(1)\fP
|
||||
\fIsalt\-minion(1)\fP
|
||||
\fBsalt(7)\fP
|
||||
\fBsalt\-master(1)\fP
|
||||
\fBsalt\-minion(1)\fP
|
||||
.SH AUTHOR
|
||||
Thomas S. Hatch <thatch45@gmail.com> and many others, please see the Authors file
|
||||
.SH COPYRIGHT
|
||||
2016 SaltStack, Inc.
|
||||
.\" Generated by docutils manpage writer.
|
||||
.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "SALT-SYNDIC" "1" "October 31, 2016" "2016.11.0" "Salt"
|
||||
.TH "SALT-SYNDIC" "1" "Mar 13, 2018" "2017.7.5" "Salt"
|
||||
.SH NAME
|
||||
salt-syndic \- salt-syndic Documentation
|
||||
.
|
||||
|
@ -110,12 +110,10 @@ Logfile logging log level. One of \fBall\fP, \fBgarbage\fP, \fBtrace\fP,
|
|||
.UNINDENT
|
||||
.SH SEE ALSO
|
||||
.sp
|
||||
\fIsalt(1)\fP
|
||||
\fIsalt\-master(1)\fP
|
||||
\fIsalt\-minion(1)\fP
|
||||
\fBsalt(1)\fP
|
||||
\fBsalt\-master(1)\fP
|
||||
\fBsalt\-minion(1)\fP
|
||||
.SH AUTHOR
|
||||
Thomas S. Hatch <thatch45@gmail.com> and many others, please see the Authors file
|
||||
.SH COPYRIGHT
|
||||
2016 SaltStack, Inc.
|
||||
.\" Generated by docutils manpage writer.
|
||||
.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "SALT-UNITY" "1" "October 31, 2016" "2016.11.0" "Salt"
|
||||
.TH "SALT-UNITY" "1" "Mar 13, 2018" "2017.7.5" "Salt"
|
||||
.SH NAME
|
||||
salt-unity \- salt-unity Command
|
||||
.
|
||||
|
@ -50,20 +50,18 @@ invokes that script.
|
|||
.SH OPTIONS
|
||||
.SH SEE ALSO
|
||||
.sp
|
||||
\fIsalt\-api(1)\fP
|
||||
\fIsalt\-call(1)\fP
|
||||
\fIsalt\-cloud(1)\fP
|
||||
\fIsalt\-cp(1)\fP
|
||||
\fIsalt\-key(1)\fP
|
||||
\fIsalt\-main(1)\fP
|
||||
\fIsalt\-master(1)\fP
|
||||
\fIsalt\-minion(1)\fP
|
||||
\fIsalt\-run(1)\fP
|
||||
\fIsalt\-ssh(1)\fP
|
||||
\fIsalt\-syndic(1)\fP
|
||||
\fBsalt\-api(1)\fP
|
||||
\fBsalt\-call(1)\fP
|
||||
\fBsalt\-cloud(1)\fP
|
||||
\fBsalt\-cp(1)\fP
|
||||
\fBsalt\-key(1)\fP
|
||||
\fBsalt\-main(1)\fP
|
||||
\fBsalt\-master(1)\fP
|
||||
\fBsalt\-minion(1)\fP
|
||||
\fBsalt\-run(1)\fP
|
||||
\fBsalt\-ssh(1)\fP
|
||||
\fBsalt\-syndic(1)\fP
|
||||
.SH AUTHOR
|
||||
Thomas S. Hatch <thatch45@gmail.com> and many others, please see the Authors file
|
||||
.SH COPYRIGHT
|
||||
2016 SaltStack, Inc.
|
||||
.\" Generated by docutils manpage writer.
|
||||
.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "SALT" "1" "October 31, 2016" "2016.11.0" "Salt"
|
||||
.TH "SALT" "1" "Mar 13, 2018" "2017.7.5" "Salt"
|
||||
.SH NAME
|
||||
salt \- salt
|
||||
.
|
||||
|
@ -306,6 +306,11 @@ Write the output to the specified file.
|
|||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-\-out\-file\-append, \-\-output\-file\-append
|
||||
Append the output to the specified file.
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-\-no\-color
|
||||
Disable all colored output
|
||||
.UNINDENT
|
||||
|
@ -324,14 +329,25 @@ changes and success and \fByellow\fP denotes a expected future change in configu
|
|||
.UNINDENT
|
||||
.UNINDENT
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-\-state\-output=STATE_OUTPUT, \-\-state_output=STATE_OUTPUT
|
||||
Override the configured state_output value for minion
|
||||
output. One of \(aqfull\(aq, \(aqterse\(aq, \(aqmixed\(aq, \(aqchanges\(aq or
|
||||
\(aqfilter\(aq. Default: \(aqnone\(aq.
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
.TP
|
||||
.B \-\-state\-verbose=STATE_VERBOSE, \-\-state_verbose=STATE_VERBOSE
|
||||
Override the configured state_verbose value for minion
|
||||
output. Set to True or False. Default: none.
|
||||
.UNINDENT
|
||||
.SH SEE ALSO
|
||||
.sp
|
||||
\fIsalt(7)\fP
|
||||
\fIsalt\-master(1)\fP
|
||||
\fIsalt\-minion(1)\fP
|
||||
\fBsalt(7)\fP
|
||||
\fBsalt\-master(1)\fP
|
||||
\fBsalt\-minion(1)\fP
|
||||
.SH AUTHOR
|
||||
Thomas S. Hatch <thatch45@gmail.com> and many others, please see the Authors file
|
||||
.SH COPYRIGHT
|
||||
2016 SaltStack, Inc.
|
||||
.\" Generated by docutils manpage writer.
|
||||
.
|
||||
|
|
142382
doc/man/salt.7
142382
doc/man/salt.7
File diff suppressed because it is too large
Load diff
|
@ -1,6 +1,6 @@
|
|||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "SPM" "1" "October 31, 2016" "2016.11.0" "Salt"
|
||||
.TH "SPM" "1" "Mar 13, 2018" "2017.7.5" "Salt"
|
||||
.SH NAME
|
||||
spm \- Salt Package Manager Command
|
||||
.
|
||||
|
@ -132,12 +132,10 @@ in that directory which describes them.
|
|||
.UNINDENT
|
||||
.SH SEE ALSO
|
||||
.sp
|
||||
\fIsalt(1)\fP
|
||||
\fIsalt\-master(1)\fP
|
||||
\fIsalt\-minion(1)\fP
|
||||
\fBsalt(1)\fP
|
||||
\fBsalt\-master(1)\fP
|
||||
\fBsalt\-minion(1)\fP
|
||||
.SH AUTHOR
|
||||
Thomas S. Hatch <thatch45@gmail.com> and many others, please see the Authors file
|
||||
.SH COPYRIGHT
|
||||
2016 SaltStack, Inc.
|
||||
.\" Generated by docutils manpage writer.
|
||||
.
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
.. _all-salt.clouds:
|
||||
|
||||
===============================
|
||||
Full list of Salt Cloud modules
|
||||
===============================
|
||||
=============
|
||||
cloud modules
|
||||
=============
|
||||
|
||||
.. currentmodule:: salt.cloud.clouds
|
||||
|
||||
|
|
|
@ -519,7 +519,7 @@ Default: ``0``
|
|||
|
||||
Memcache is an additional cache layer that keeps a limited amount of data
|
||||
fetched from the minion data cache for a limited period of time in memory that
|
||||
makes cache operations faster. It doesn't make much sence for the ``localfs``
|
||||
makes cache operations faster. It doesn't make much sense for the ``localfs``
|
||||
cache driver but helps for more complex drivers like ``consul``.
|
||||
|
||||
This option sets the memcache items expiration time. By default is set to ``0``
|
||||
|
@ -956,6 +956,38 @@ The TCP port for ``mworkers`` to connect to on the master.
|
|||
|
||||
tcp_master_workers: 4515
|
||||
|
||||
.. conf_master:: auth_events
|
||||
|
||||
``auth_events``
|
||||
--------------------
|
||||
|
||||
.. versionadded:: 2017.7.3
|
||||
|
||||
Default: ``True``
|
||||
|
||||
Determines whether the master will fire authentication events.
|
||||
:ref:`Authentication events <event-master_auth>` are fired when
|
||||
a minion performs an authentication check with the master.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
auth_events: True
|
||||
|
||||
.. conf_master:: minion_data_cache_events
|
||||
|
||||
``minion_data_cache_events``
|
||||
--------------------
|
||||
|
||||
.. versionadded:: 2017.7.3
|
||||
|
||||
Default: ``True``
|
||||
|
||||
Determines whether the master will fire minion data cache events. Minion data
|
||||
cache events are fired when a minion requests a minion data cache refresh.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
minion_data_cache_events: True
|
||||
|
||||
.. _salt-ssh-configuration:
|
||||
|
||||
|
@ -3997,6 +4029,25 @@ Recursively merge lists by aggregating them instead of replacing them.
|
|||
|
||||
pillar_merge_lists: False
|
||||
|
||||
.. conf_master:: pillar_includes_override_sls
|
||||
|
||||
``pillar_includes_override_sls``
|
||||
********************************
|
||||
|
||||
.. versionadded:: 2017.7.6,2018.3.1
|
||||
|
||||
Default: ``False``
|
||||
|
||||
Prior to version 2017.7.3, keys from :ref:`pillar includes <pillar-include>`
|
||||
would be merged on top of the pillar SLS. Since 2017.7.3, the includes are
|
||||
merged together and then the pillar SLS is merged on top of that.
|
||||
|
||||
Set this option to ``True`` to return to the old behavior.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
pillar_includes_override_sls: True
|
||||
|
||||
.. _pillar-cache-opts:
|
||||
|
||||
Pillar Cache Options
|
||||
|
@ -4820,11 +4871,10 @@ branch/tag.
|
|||
|
||||
winrepo_branch: winrepo
|
||||
|
||||
ext_pillar:
|
||||
- git:
|
||||
- https://mygitserver/winrepo1.git
|
||||
- https://mygitserver/winrepo2.git:
|
||||
- foo https://mygitserver/winrepo3.git
|
||||
winrepo_remotes:
|
||||
- https://mygitserver/winrepo1.git
|
||||
- https://mygitserver/winrepo2.git:
|
||||
- foo https://mygitserver/winrepo3.git
|
||||
|
||||
.. conf_master:: winrepo_ssl_verify
|
||||
|
||||
|
|
|
@ -883,7 +883,7 @@ restart.
|
|||
|
||||
Default: ``0``
|
||||
|
||||
Instructs the minion to ping its master(s) every n number of seconds. Used
|
||||
Instructs the minion to ping its master(s) every n number of minutes. Used
|
||||
primarily as a mitigation technique against minion disconnects.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
@ -2750,6 +2750,27 @@ the metadata will be refreshed.
|
|||
|
||||
.. _winrepo-minion-config-opts:
|
||||
|
||||
Minion Windows Software Repo Settings
|
||||
=====================================
|
||||
|
||||
.. important::
|
||||
To use these config options, the minion can be running in master-minion or
|
||||
masterless mode.
|
||||
|
||||
|
||||
.. conf_minion:: winrepo_source_dir
|
||||
|
||||
``winrepo_source_dir``
|
||||
----------------------
|
||||
|
||||
Default: ``salt://win/repo-ng/``
|
||||
|
||||
The source location for the winrepo sls files.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
winrepo_source_dir: salt://win/repo-ng/
|
||||
|
||||
Standalone Minion Windows Software Repo Settings
|
||||
================================================
|
||||
|
||||
|
@ -2793,19 +2814,6 @@ out for 2015.8.0 and later minions.
|
|||
|
||||
winrepo_dir_ng: /srv/salt/win/repo-ng
|
||||
|
||||
.. conf_minion:: winrepo_source_dir
|
||||
|
||||
``winrepo_source_dir``
|
||||
----------------------
|
||||
|
||||
Default: ``salt://win/repo-ng/``
|
||||
|
||||
The source location for the winrepo sls files.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
winrepo_source_dir: salt://win/repo-ng/
|
||||
|
||||
.. conf_minion:: winrepo_cachefile
|
||||
.. conf_minion:: win_repo_cachefile
|
||||
|
||||
|
|
|
@ -108,7 +108,7 @@ The frequency of keepalive checks, in minutes. It requires the
|
|||
|
||||
Default: ``True``
|
||||
|
||||
Wheter the proxy should maintain the connection with the remote
|
||||
Whether the proxy should maintain the connection with the remote
|
||||
device. Similarly to :conf_proxy:`proxy_keep_alive`, this option
|
||||
is very specific to the design of the proxy module.
|
||||
When :conf_proxy:`proxy_always_alive` is set to ``False``,
|
||||
|
@ -126,7 +126,7 @@ has to be closed after every command.
|
|||
|
||||
Default: ``False``.
|
||||
|
||||
Wheter the pillar data to be merged into the proxy configuration options.
|
||||
Whether the pillar data to be merged into the proxy configuration options.
|
||||
As multiple proxies can run on the same server, we may need different
|
||||
configuration options for each, while there's one single configuration file.
|
||||
The solution is merging the pillar data of each proxy minion into the opts.
|
||||
|
|
|
@ -11,6 +11,7 @@ This section contains a list of the Python modules that are used to extend the v
|
|||
../ref/auth/all/index
|
||||
../ref/beacons/all/index
|
||||
../ref/cache/all/index
|
||||
../ref/clouds/all/index
|
||||
../ref/engines/all/index
|
||||
../ref/file_server/all/index
|
||||
../ref/grains/all/index
|
||||
|
|
|
@ -6,7 +6,7 @@ The Salt Fileserver and Client
|
|||
Introduction
|
||||
------------
|
||||
|
||||
Salt has a modular fileserver, and mulitple client classes which are used to
|
||||
Salt has a modular fileserver, and multiple client classes which are used to
|
||||
interact with it. This page serves as a developer's reference, to help explain
|
||||
how the fileserver and clients both work.
|
||||
|
||||
|
|
|
@ -10,9 +10,10 @@ to have access to execute select salt commands on minions from the master.
|
|||
The publisher ACL system is configured in the master configuration file via the
|
||||
``publisher_acl`` configuration option. Under the ``publisher_acl``
|
||||
configuration option the users open to send commands are specified and then a
|
||||
list of regular expressions which specify the minion functions which will be
|
||||
made available to specified user. This configuration is much like the ``peer``
|
||||
configuration:
|
||||
list of the minion functions which will be made available to specified user.
|
||||
Both users and functions could be specified by exact match, shell glob or
|
||||
regular expression. This configuration is much like the :ref:`external_auth
|
||||
<acl-eauth>` configuration:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
|
@ -25,9 +26,19 @@ configuration:
|
|||
- web*:
|
||||
- test.*
|
||||
- pkg.*
|
||||
# Allow managers to use saltutil module functions
|
||||
manager_.*:
|
||||
# Allow admin and managers to use saltutil module functions
|
||||
admin|manager_.*:
|
||||
- saltutil.*
|
||||
# Allow users to use only my_mod functions on "web*" minions with specific arguments.
|
||||
user_.*:
|
||||
- web*:
|
||||
- 'my_mod.*':
|
||||
args:
|
||||
- 'a.*'
|
||||
- 'b.*'
|
||||
kwargs:
|
||||
'kwa': 'kwa.*'
|
||||
'kwb': 'kwb'
|
||||
|
||||
Permission Issues
|
||||
-----------------
|
||||
|
|
|
@ -12,7 +12,7 @@ option to your state declaration:
|
|||
service.running:
|
||||
- parallel: True
|
||||
|
||||
Now ``nginx`` will be started in a seperate process from the normal state run
|
||||
Now ``nginx`` will be started in a separate process from the normal state run
|
||||
and will therefore not block additional states.
|
||||
|
||||
Parallel States and Requisites
|
||||
|
|
|
@ -1019,7 +1019,7 @@ so:-
|
|||
- AndThirdSecurityGroup
|
||||
|
||||
Note that 'subnetid' takes precedence over 'subnetname', but 'securitygroupid'
|
||||
and 'securitygroupname' are merged toghether to generate a single list for
|
||||
and 'securitygroupname' are merged together to generate a single list for
|
||||
SecurityGroups of instances.
|
||||
|
||||
Specifying interface properties
|
||||
|
|
|
@ -156,7 +156,7 @@ security_group
|
|||
~~~~~~~~~~~~~~
|
||||
.. versionadded:: next-release
|
||||
|
||||
You can specifiy a list of security groups (by name or id) that should be
|
||||
You can specify a list of security groups (by name or id) that should be
|
||||
assigned to the VM.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
|
|
@ -223,7 +223,7 @@ branches, and dot release branches.
|
|||
.. note::
|
||||
|
||||
GitHub will open pull requests against Salt's main branch, ``develop``,
|
||||
byndefault. Be sure to check which branch is selected when creating the
|
||||
by default. Be sure to check which branch is selected when creating the
|
||||
pull request.
|
||||
|
||||
The Develop Branch
|
||||
|
|
|
@ -981,10 +981,10 @@ The :py:func:`file.serialize <salt.states.file.serialize>` state can provide a
|
|||
shorthand for creating some files from data structures. There are also many
|
||||
examples within Salt Formulas of creating one-off "serializers" (often as Jinja
|
||||
macros) that reformat a data structure to a specific config file format. For
|
||||
example, `Nginx vhosts`__ or the `php.ini`__
|
||||
example, look at the`Nginx vhosts`_ states or the `php.ini`_ file template.
|
||||
|
||||
__: https://github.com/saltstack-formulas/nginx-formula/blob/5cad4512/nginx/ng/vhosts_config.sls
|
||||
__: https://github.com/saltstack-formulas/php-formula/blob/82e2cd3a/php/ng/files/php.ini
|
||||
.. _`Nginx vhosts`: https://github.com/saltstack-formulas/nginx-formula/blob/5cad4512/nginx/ng/vhosts_config.sls
|
||||
.. _`php.ini`: https://github.com/saltstack-formulas/php-formula/blob/82e2cd3a/php/ng/files/php.ini
|
||||
|
||||
Environment specific information
|
||||
................................
|
||||
|
@ -1234,7 +1234,7 @@ target platform, and any other installation or usage instructions or tips.
|
|||
|
||||
A sample skeleton for the ``README.rst`` file:
|
||||
|
||||
.. code-block:: rest
|
||||
.. code-block:: restructuredtext
|
||||
|
||||
===
|
||||
foo
|
||||
|
@ -1242,10 +1242,10 @@ A sample skeleton for the ``README.rst`` file:
|
|||
|
||||
Install and configure the FOO service.
|
||||
|
||||
.. note::
|
||||
**NOTE**
|
||||
|
||||
See the full `Salt Formulas installation and usage instructions
|
||||
<http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html>`_.
|
||||
See the full `Salt Formulas installation and usage instructions
|
||||
<https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html>`_.
|
||||
|
||||
Available states
|
||||
================
|
||||
|
@ -1274,7 +1274,7 @@ A sample skeleton for the `CHANGELOG.rst` file:
|
|||
|
||||
:file:`CHANGELOG.rst`:
|
||||
|
||||
.. code-block:: rest
|
||||
.. code-block:: restructuredtext
|
||||
|
||||
foo formula
|
||||
===========
|
||||
|
|
|
@ -436,7 +436,7 @@ external resource, like a cloud virtual machine. This decorator is not normally
|
|||
used by developers outside of the Salt core team.
|
||||
|
||||
`@destructiveTest` -- Marks a test as potentially destructive. It will not be run
|
||||
by the test runner unles the ``-run-destructive`` test is expressly passed.
|
||||
by the test runner unless the ``-run-destructive`` test is expressly passed.
|
||||
|
||||
`@requires_network` -- Requires a network connection for the test to operate
|
||||
successfully. If a network connection is not detected, the test will not run.
|
||||
|
|
|
@ -98,7 +98,7 @@ Mocking Loader Modules
|
|||
Salt loader modules use a series of globally available dunder variables,
|
||||
``__salt__``, ``__opts__``, ``__pillar__``, etc. To facilitate testing these
|
||||
modules a mixin class was created, ``LoaderModuleMockMixin`` which can be found
|
||||
in ``tests/support/mixins.py``. The reason for the existance of this class is
|
||||
in ``tests/support/mixins.py``. The reason for the existence of this class is
|
||||
because historiclly and because it was easier, one would add these dunder
|
||||
variables directly on the imported module. This however, introduces unexpected
|
||||
behavior when running the full test suite since those attributes would not be
|
||||
|
|
|
@ -27,12 +27,13 @@ in the master configuration file and uses the :ref:`access control system
|
|||
- 'web*':
|
||||
- test.*
|
||||
- network.*
|
||||
steve:
|
||||
steve|admin.*:
|
||||
- .*
|
||||
|
||||
The above configuration allows the user ``thatch`` to execute functions
|
||||
in the test and network modules on the minions that match the web* target.
|
||||
User ``steve`` is given unrestricted access to minion commands.
|
||||
The above configuration allows the user ``thatch`` to execute functions in the
|
||||
test and network modules on the minions that match the web* target. User
|
||||
``steve`` and the users whose logins start with ``admin``, are granted
|
||||
unrestricted access to minion commands.
|
||||
|
||||
Salt respects the current PAM configuration in place, and uses the 'login'
|
||||
service to authenticate.
|
||||
|
@ -71,8 +72,8 @@ Matching syntax
|
|||
---------------
|
||||
|
||||
The structure of the ``external_auth`` dictionary can take the following
|
||||
shapes. Function matches are regular expressions; minion matches are compound
|
||||
targets.
|
||||
shapes. User and function matches are exact matches, shell glob patterns or
|
||||
regular expressions; minion matches are compound targets.
|
||||
|
||||
By user:
|
||||
|
||||
|
@ -122,8 +123,8 @@ Positional arguments or keyword arguments to functions can also be whitelisted.
|
|||
- '*':
|
||||
- 'my_mod.*':
|
||||
args:
|
||||
- 'a.*'
|
||||
- 'b.*'
|
||||
- 'a.*'
|
||||
- 'b.*'
|
||||
kwargs:
|
||||
'kwa': 'kwa.*'
|
||||
'kwb': 'kwb'
|
||||
|
|
|
@ -7,6 +7,8 @@ Salt Master Events
|
|||
These events are fired on the Salt Master event bus. This list is **not**
|
||||
comprehensive.
|
||||
|
||||
.. _event-master_auth:
|
||||
|
||||
Authentication events
|
||||
=====================
|
||||
|
||||
|
|
|
@ -86,7 +86,7 @@ Dependencies
|
|||
|
||||
Salt should run on any Unix-like platform so long as the dependencies are met.
|
||||
|
||||
* `Python 2.6`_ >= 2.6 <3.0
|
||||
* `Python 2.7`_ >= 2.7 <3.0
|
||||
* `msgpack-python`_ - High-performance message interchange format
|
||||
* `YAML`_ - Python YAML bindings
|
||||
* `Jinja2`_ - parsing Salt States (configurable in the master settings)
|
||||
|
|
|
@ -8,7 +8,8 @@ Installation from the Official SaltStack Repository
|
|||
===================================================
|
||||
|
||||
**Latest stable build from the selected branch**:
|
||||
|osxdownload|
|
||||
|osxdownloadpy2|
|
||||
|osxdownloadpy3|
|
||||
|
||||
The output of ``md5 <salt pkg>`` should match the contents of the
|
||||
corresponding md5 file.
|
||||
|
|
|
@ -49,17 +49,13 @@ the SaltStack Repository.
|
|||
Installation from the Community-Maintained Repository
|
||||
=====================================================
|
||||
|
||||
Beginning with version 0.9.4, Salt has been available in `EPEL`_. For
|
||||
RHEL/CentOS 5, `Fedora COPR`_ is a single community repository that provides
|
||||
Salt packages due to the removal from EPEL5.
|
||||
Beginning with version 0.9.4, Salt has been available in `EPEL`_.
|
||||
|
||||
.. note::
|
||||
Packages in these repositories are built by community, and it can
|
||||
take a little while until the latest stable SaltStack release become
|
||||
available.
|
||||
Packages in this repository are built by community, and it can take a little
|
||||
while until the latest stable SaltStack release become available.
|
||||
|
||||
.. _`EPEL`: http://fedoraproject.org/wiki/EPEL
|
||||
.. _`Fedora COPR`: https://copr.fedorainfracloud.org/coprs/saltstack/salt-el5/
|
||||
|
||||
RHEL/CentOS 6 and 7, Scientific Linux, etc.
|
||||
-------------------------------------------
|
||||
|
@ -146,26 +142,13 @@ ZeroMQ 4
|
|||
========
|
||||
|
||||
We recommend using ZeroMQ 4 where available. SaltStack provides ZeroMQ 4.0.5
|
||||
and pyzmq 14.5.0 in the :ref:`SaltStack Repository <installation-rhel-repo>`
|
||||
as well as a separate `zeromq4 COPR`_ repository.
|
||||
|
||||
.. _`zeromq4 COPR`: http://copr.fedorainfracloud.org/coprs/saltstack/zeromq4/
|
||||
and ``pyzmq`` 14.5.0 in the :ref:`SaltStack Repository
|
||||
<installation-rhel-repo>`.
|
||||
|
||||
If this repository is added *before* Salt is installed, then installing either
|
||||
``salt-master`` or ``salt-minion`` will automatically pull in ZeroMQ 4.0.5, and
|
||||
additional steps to upgrade ZeroMQ and pyzmq are unnecessary.
|
||||
|
||||
.. warning:: RHEL/CentOS 5 Users
|
||||
Using COPR repos on RHEL/CentOS 5 requires that the ``python-hashlib``
|
||||
package be installed. Not having it present will result in checksum errors
|
||||
because YUM will not be able to process the SHA256 checksums used by COPR.
|
||||
|
||||
.. note::
|
||||
For RHEL/CentOS 5 installations, if using the SaltStack repo or Fedora COPR
|
||||
to install Salt (as described :ref:`above <installation-rhel-repo>`),
|
||||
then it is not necessary to enable the `zeromq4 COPR`_, because those
|
||||
repositories already include ZeroMQ 4.
|
||||
|
||||
Package Management
|
||||
==================
|
||||
|
||||
|
|
|
@ -17,4 +17,4 @@ For example, to install the develop version of salt:
|
|||
|
||||
.. note::
|
||||
|
||||
SaltStack does offer commerical support for Solaris which includes packages.
|
||||
SaltStack does offer commercial support for Solaris which includes packages.
|
||||
|
|
|
@ -1348,7 +1348,7 @@ Example:
|
|||
|
||||
.. code-block:: jinja
|
||||
|
||||
{{ 'www.google.com' | dns_check }}
|
||||
{{ 'www.google.com' | dns_check(port=443) }}
|
||||
|
||||
Returns:
|
||||
|
||||
|
@ -1542,13 +1542,13 @@ Example:
|
|||
|
||||
.. code-block:: jinja
|
||||
|
||||
regex_escape = {{ 'https://example.com?foo=bar%20baz' | regex_escape }}
|
||||
regex_escape = {{ 'https://example.com?foo=bar%20baz' | regex_escape }}
|
||||
|
||||
will be rendered as:
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
regex_escape = https\:\/\/example\.com\?foo\=bar\%20baz
|
||||
regex_escape = https\:\/\/example\.com\?foo\=bar\%20baz
|
||||
|
||||
Set Theory Filters
|
||||
------------------
|
||||
|
@ -1566,13 +1566,13 @@ Example:
|
|||
|
||||
.. code-block:: jinja
|
||||
|
||||
unique = {{ ['foo', 'foo', 'bar'] | unique }}
|
||||
unique = {{ ['foo', 'foo', 'bar'] | unique }}
|
||||
|
||||
will be rendered as:
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
unique = ['foo', 'bar']
|
||||
unique = ['foo', 'bar']
|
||||
|
||||
Jinja in Files
|
||||
==============
|
||||
|
|
|
@ -18,7 +18,7 @@ and others):
|
|||
The major difference between these two mechanism is from where results are
|
||||
returned (from the Salt Master or Salt Minion). Configuring either of these
|
||||
options will also make the :py:mod:`Jobs Runner functions <salt.runners.jobs>`
|
||||
to automatically query the remote stores for infomation.
|
||||
to automatically query the remote stores for information.
|
||||
|
||||
External Job Cache - Minion-Side Returner
|
||||
-----------------------------------------
|
||||
|
|
|
@ -5,10 +5,10 @@ Orchestrate Runner
|
|||
==================
|
||||
|
||||
Executing states or highstate on a minion is perfect when you want to ensure that
|
||||
minion configured and running the way you want. Sometimes however you want to
|
||||
minion configured and running the way you want. Sometimes however you want to
|
||||
configure a set of minions all at once.
|
||||
|
||||
For example, if you want to set up a load balancer in front of a cluster of web
|
||||
For example, if you want to set up a load balancer in front of a cluster of web
|
||||
servers you can ensure the load balancer is set up first, and then the same
|
||||
matching configuration is applied consistently across the whole cluster.
|
||||
|
||||
|
@ -266,7 +266,35 @@ Given the above setup, the orchestration will be carried out as follows:
|
|||
3. Finally, the ``ceph`` SLS target will be executed on all minions which have
|
||||
a grain called ``role`` with a value of ``storage``.
|
||||
|
||||
|
||||
.. note::
|
||||
|
||||
Remember, salt-run is always executed on the master.
|
||||
Remember, salt-run is *always* executed on the master.
|
||||
|
||||
|
||||
Running States on the Master without a Minion
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The orchestrate runner can be used to execute states on the master without
|
||||
using a minion. For example, assume that ``salt://foo.sls`` contains the
|
||||
following SLS:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
/etc/foo.conf:
|
||||
file.managed:
|
||||
- source: salt://files/foo.conf
|
||||
- mode: 0600
|
||||
|
||||
In this case, running ``salt-run state.orchestrate foo`` would be the
|
||||
equivalent of running a ``state.sls foo``, but it would execute on the master
|
||||
only, and would not require a minion daemon to be running on the master.
|
||||
|
||||
This is not technically orchestration, but it can be useful in certain use
|
||||
cases.
|
||||
|
||||
Limitations
|
||||
^^^^^^^^^^^
|
||||
|
||||
Only one SLS target can be run at a time using this method, while using
|
||||
:py:func:`state.sls <salt.modules.state.sls>` allows for multiple SLS files to
|
||||
be passed in a comma-separated list.
|
||||
|
|
|
@ -168,6 +168,28 @@ And the actual pillar file at '/srv/pillar/common_pillar.sls':
|
|||
context.
|
||||
|
||||
|
||||
Dynamic Pillar Environments
|
||||
===========================
|
||||
|
||||
If environment ``__env__`` is specified in :conf_master:`pillar_roots`, all
|
||||
environments that are not explicitly specified in :conf_master:`pillar_roots`
|
||||
will map to the directories from ``__env__``. This allows one to use dynamic
|
||||
git branch based environments for state/pillar files with the same file-based
|
||||
pillar applying to all environments. For example:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
pillar_roots:
|
||||
__env__:
|
||||
- /srv/pillar
|
||||
|
||||
ext_pillar:
|
||||
- git:
|
||||
- __env__ https://example.com/git-pillar.git
|
||||
|
||||
.. versionadded:: 2017.7.5,2018.3.1
|
||||
|
||||
|
||||
Pillar Namespace Flattening
|
||||
===========================
|
||||
|
||||
|
@ -263,6 +285,8 @@ Since both pillar SLS files contained a ``bind`` key which contained a nested
|
|||
dictionary, the pillar dictionary's ``bind`` key contains the combined contents
|
||||
of both SLS files' ``bind`` keys.
|
||||
|
||||
.. _pillar-include:
|
||||
|
||||
Including Other Pillars
|
||||
=======================
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ and each event tag has a list of reactor SLS files to be run.
|
|||
Reactor SLS files are similar to State and Pillar SLS files. They are by
|
||||
default YAML + Jinja templates and are passed familiar context variables.
|
||||
Click :ref:`here <reactor-jinja-context>` for more detailed information on the
|
||||
variables availble in Jinja templating.
|
||||
variables available in Jinja templating.
|
||||
|
||||
Here is the SLS for a simple reaction:
|
||||
|
||||
|
@ -179,7 +179,7 @@ The below two examples are equivalent:
|
|||
| | fromrepo: updates |
|
||||
+---------------------------------+-----------------------------+
|
||||
|
||||
This reaction would be equvalent to running the following Salt command:
|
||||
This reaction would be equivalent to running the following Salt command:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
|
@ -230,7 +230,7 @@ The below two examples are equivalent:
|
|||
+-------------------------------------------------+-------------------------------------------------+
|
||||
|
||||
Assuming that the event tag is ``foo``, and the data passed to the event is
|
||||
``{'bar': 'baz'}``, then this reaction is equvalent to running the following
|
||||
``{'bar': 'baz'}``, then this reaction is equivalent to running the following
|
||||
Salt command:
|
||||
|
||||
.. code-block:: bash
|
||||
|
@ -295,7 +295,7 @@ The below two examples are equivalent:
|
|||
| - name: /tmp/foo | - /tmp/foo |
|
||||
+---------------------------------+---------------------------+
|
||||
|
||||
This reaction is equvalent to running the following Salt command:
|
||||
This reaction is equivalent to running the following Salt command:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
|
|
|
@ -1251,12 +1251,12 @@ Changes:
|
|||
- **PR** `#24456`_: (*rallytime*) Back-port `#24441`_ to 2015.5
|
||||
@ *2015-06-05T22:32:25Z*
|
||||
|
||||
- **PR** `#24441`_: (*arthurlogilab*) [doc] Alignement fix on external_auth documentation
|
||||
- **PR** `#24441`_: (*arthurlogilab*) [doc] Alignment fix on external_auth documentation
|
||||
| refs: `#24456`_
|
||||
* ced558a Merge pull request `#24456`_ from rallytime/`bp-24441`_
|
||||
* 7002855 yaml indentations should be 2 spaces
|
||||
|
||||
* 21b51ab [doc] Alignement fix on external_auth documentation
|
||||
* 21b51ab [doc] Alignment fix on external_auth documentation
|
||||
|
||||
- **PR** `#24398`_: (*kiorky*) VirtualName for states.apt
|
||||
| refs: `#24399`_
|
||||
|
|
|
@ -21,7 +21,7 @@ Minion Data Cache Fixes
|
|||
Added Memcache booster for the minion data cache.
|
||||
Memcache is an additional cache layer that keeps a limited amount of data
|
||||
fetched from the minion data cache for a limited period of time in memory that
|
||||
makes cache operations faster. It doesn't make much sence for the ``localfs``
|
||||
makes cache operations faster. It doesn't make much sense for the ``localfs``
|
||||
cache driver but helps for more complex drivers like ``consul``.
|
||||
For more details see ``memcache_expire_seconds`` and other ``memcache_*``
|
||||
options in the master config reverence.
|
||||
|
|
|
@ -518,7 +518,7 @@ Changes:
|
|||
|
||||
* ef8e3ef569 Update win_pki.py
|
||||
|
||||
- **PR** `#41557`_: (*dmurphy18*) Add symbolic link for salt-proxy service similar to other serivce files
|
||||
- **PR** `#41557`_: (*dmurphy18*) Add symbolic link for salt-proxy service similar to other service files
|
||||
@ *2017-06-06T17:13:52Z*
|
||||
|
||||
* 3335fcbc7d Merge pull request `#41557`_ from dmurphy18/fix-proxy-service
|
||||
|
@ -753,7 +753,7 @@ Changes:
|
|||
|
||||
* 66ab1e5184 Re-adding neutron dependency check
|
||||
|
||||
* cce07eefc2 Updating Neutron module to suport KeystoneAuth
|
||||
* cce07eefc2 Updating Neutron module to support KeystoneAuth
|
||||
|
||||
- **PR** `#41409`_: (*garethgreenaway*) Fixes to ipc transport
|
||||
@ *2017-05-25T21:06:27Z*
|
||||
|
@ -926,7 +926,7 @@ Changes:
|
|||
|
||||
- **ISSUE** `#41306`_: (*lomeroe*) win_lgpo does not properly pack group policy version number in gpt.ini
|
||||
| refs: `#41319`_ `#41307`_
|
||||
- **PR** `#41307`_: (*lomeroe*) properly pack/unpack the verison numbers into a number
|
||||
- **PR** `#41307`_: (*lomeroe*) properly pack/unpack the version numbers into a number
|
||||
| refs: `#41319`_
|
||||
* 140b0427e1 Merge pull request `#41319`_ from lomeroe/bp_41307
|
||||
* 4f0aa577a5 backport 41307 to 2016.11, properly pack version numbers into single number
|
||||
|
|
|
@ -632,7 +632,7 @@ Changes:
|
|||
* 3072576 Merge pull request `#42629`_ from xiaoanyunfei/tornadoapi
|
||||
* 1e13383 tornado api
|
||||
|
||||
- **PR** `#42655`_: (*whiteinge*) Reenable cpstats for rest_cherrypy
|
||||
- **PR** `#42655`_: (*whiteinge*) Re-enable cpstats for rest_cherrypy
|
||||
@ *2017-08-03T20:44:10Z*
|
||||
|
||||
- **PR** `#33806`_: (*cachedout*) Work around upstream cherrypy bug
|
||||
|
@ -640,7 +640,7 @@ Changes:
|
|||
* f0f00fc Merge pull request `#42655`_ from whiteinge/rest_cherrypy-reenable-stats
|
||||
* deb6316 Fix lint errors
|
||||
|
||||
* 6bd91c8 Reenable cpstats for rest_cherrypy
|
||||
* 6bd91c8 Re-enable cpstats for rest_cherrypy
|
||||
|
||||
- **PR** `#42693`_: (*gilbsgilbs*) Fix RabbitMQ tags not properly set.
|
||||
@ *2017-08-03T20:23:08Z*
|
||||
|
@ -847,11 +847,11 @@ Changes:
|
|||
* 42bb1a6 Merge pull request `#42350`_ from twangboy/win_fix_ver_grains_2016.11
|
||||
* 8c04840 Detect Server OS with a desktop release name
|
||||
|
||||
- **PR** `#42356`_: (*meaksh*) Allow to check whether a function is available on the AliasesLoader wrapper
|
||||
- **PR** `#42356`_: (*meaksh*) Allow checking whether a function is available on the AliasesLoader wrapper
|
||||
@ *2017-07-19T16:56:41Z*
|
||||
|
||||
* 0a72e56 Merge pull request `#42356`_ from meaksh/2016.11-AliasesLoader-wrapper-fix
|
||||
* 915d942 Allow to check whether a function is available on the AliasesLoader wrapper
|
||||
* 915d942 Allow checking whether a function is available on the AliasesLoader wrapper
|
||||
|
||||
- **PR** `#42368`_: (*twangboy*) Remove build and dist directories before install (2016.11)
|
||||
@ *2017-07-19T16:47:28Z*
|
||||
|
@ -1392,7 +1392,7 @@ Changes:
|
|||
|
||||
* 7f69613 test and lint fixes
|
||||
|
||||
* 8ee4843 Suppress output of crypt context and be more specifc with whitespace vs. serial
|
||||
* 8ee4843 Suppress output of crypt context and be more specific with whitespace vs. serial
|
||||
|
||||
* 61f817d Match serials based on output position (fix for non-English languages)
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -41,7 +41,7 @@ Salt's policy has always been that when upgrading, the minion should never be
|
|||
on a newer version than the master. Specifically with this update, because of
|
||||
changes in the fileclient, the 2017.7 minion requires a 2017.7 master.
|
||||
|
||||
Backwards compatiblity is still maintained, so older minions can still be used.
|
||||
Backwards compatibility is still maintained, so older minions can still be used.
|
||||
|
||||
More information can be found in the :ref:`Salt FAQ<which-version>`
|
||||
|
||||
|
@ -54,7 +54,7 @@ The :py:func:`service.masked <salt.states.service.masked>` and
|
|||
added to allow Salt to manage masking of systemd units.
|
||||
|
||||
Additionally, the following functions in the :mod:`systemd
|
||||
<salt.modules.systemd>` execution module have changed to accomodate the fact
|
||||
<salt.modules.systemd>` execution module have changed to accommodate the fact
|
||||
that indefinite and runtime masks can co-exist for the same unit:
|
||||
|
||||
- :py:func:`service.masked <salt.modules.systemd.masked>` - The return from
|
||||
|
@ -152,7 +152,7 @@ State Module Changes
|
|||
|
||||
In a rare case that you have a function that needs to be called several times but
|
||||
with the different parameters, an additional feature of "tagging" is to the
|
||||
rescue. In order to tag a function, use a colon delimeter. For example:
|
||||
rescue. In order to tag a function, use a colon delimiter. For example:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
|
@ -281,7 +281,7 @@ Minion Configuration Additions
|
|||
salt-api Changes
|
||||
================
|
||||
|
||||
The ``rest_cherrypy`` netapi module has recieved a few minor improvements:
|
||||
The ``rest_cherrypy`` netapi module has received a few minor improvements:
|
||||
|
||||
* A CORS bugfix.
|
||||
* A new ``/token`` convenience endpoint to generate Salt eauth tokens.
|
||||
|
@ -557,7 +557,7 @@ of objects (users, databases, roles, etc.).
|
|||
.. note::
|
||||
With the `Moby announcement`_ coming at this year's DockerCon_, Salt's
|
||||
:mod:`docker <salt.modules.dockermod>` execution module (as well as the
|
||||
state modules) work interchangably when **docker** is replaced with
|
||||
state modules) work interchangeably when **docker** is replaced with
|
||||
**moby** (e.g. :py:func:`moby_container.running
|
||||
<salt.states.docker_container.running>`, :py:func:`moby_image.present
|
||||
<salt.states.docker_image.present>`, :py:func:`moby.inspect_container
|
||||
|
|
|
@ -962,7 +962,7 @@ Changes
|
|||
- **PR** `#42884`_: (*Giandom*) Convert to dict type the pillar string value passed from slack
|
||||
@ *2017-08-16T22:30:43Z*
|
||||
|
||||
- **ISSUE** `#42842`_: (*Giandom*) retreive kwargs passed with slack engine
|
||||
- **ISSUE** `#42842`_: (*Giandom*) retrieve kwargs passed with slack engine
|
||||
| refs: `#42884`_
|
||||
* 82be9dceb6 Merge pull request `#42884`_ from Giandom/2017.7.1-fix-slack-engine-pillar-args
|
||||
* 80fd733c99 Update slack.py
|
||||
|
@ -1235,13 +1235,13 @@ Changes
|
|||
* 4ce96eb1a1 Merge pull request `#42778`_ from gtmanfred/spm
|
||||
* 7ef691e8da make sure to use the correct out_file
|
||||
|
||||
- **PR** `#42857`_: (*gtmanfred*) use older name if _create_unverified_context is unvailable
|
||||
- **PR** `#42857`_: (*gtmanfred*) use older name if _create_unverified_context is unavailable
|
||||
@ *2017-08-11T13:37:59Z*
|
||||
|
||||
- **ISSUE** `#480`_: (*zyluo*) PEP8 types clean-up
|
||||
| refs: `#42857`_
|
||||
* 3d05d89e09 Merge pull request `#42857`_ from gtmanfred/vmware
|
||||
* c1f673eca4 use older name if _create_unverified_context is unvailable
|
||||
* c1f673eca4 use older name if _create_unverified_context is unavailable
|
||||
|
||||
- **PR** `#42866`_: (*twangboy*) Change to GitPython version 2.1.1
|
||||
@ *2017-08-11T13:23:52Z*
|
||||
|
@ -1448,7 +1448,7 @@ Changes
|
|||
| refs: `#42574`_
|
||||
- **PR** `#42693`_: (*gilbsgilbs*) Fix RabbitMQ tags not properly set.
|
||||
- **PR** `#42669`_: (*garethgreenaway*) [2016.11] Fixes to augeas module
|
||||
- **PR** `#42655`_: (*whiteinge*) Reenable cpstats for rest_cherrypy
|
||||
- **PR** `#42655`_: (*whiteinge*) Re-enable cpstats for rest_cherrypy
|
||||
- **PR** `#42629`_: (*xiaoanyunfei*) tornado api
|
||||
- **PR** `#42623`_: (*terminalmage*) Fix unicode constructor in custom YAML loader
|
||||
- **PR** `#42574`_: (*sbojarski*) Fixed error reporting in "boto_cfn.present" function.
|
||||
|
@ -1469,7 +1469,7 @@ Changes
|
|||
|
||||
* deb6316d67 Fix lint errors
|
||||
|
||||
* 6bd91c8b03 Reenable cpstats for rest_cherrypy
|
||||
* 6bd91c8b03 Re-enable cpstats for rest_cherrypy
|
||||
|
||||
* 21cf15f9c3 Merge pull request `#42693`_ from gilbsgilbs/fix-rabbitmq-tags
|
||||
|
||||
|
@ -2031,7 +2031,7 @@ Changes
|
|||
- **PR** `#42368`_: (*twangboy*) Remove build and dist directories before install (2016.11)
|
||||
- **PR** `#42360`_: (*Ch3LL*) [2016.11] Update version numbers in doc config for 2017.7.0 release
|
||||
- **PR** `#42359`_: (*Ch3LL*) [2016.3] Update version numbers in doc config for 2017.7.0 release
|
||||
- **PR** `#42356`_: (*meaksh*) Allow to check whether a function is available on the AliasesLoader wrapper
|
||||
- **PR** `#42356`_: (*meaksh*) Allow checking whether a function is available on the AliasesLoader wrapper
|
||||
- **PR** `#42352`_: (*CorvinM*) Multiple documentation fixes
|
||||
- **PR** `#42350`_: (*twangboy*) Fixes problem with Version and OS Release related grains on certain versions of Python (2016.11)
|
||||
- **PR** `#42319`_: (*rallytime*) Add more documentation for config options that are missing from master/minion docs
|
||||
|
@ -2046,7 +2046,7 @@ Changes
|
|||
|
||||
* 0a72e56f6b Merge pull request `#42356`_ from meaksh/2016.11-AliasesLoader-wrapper-fix
|
||||
|
||||
* 915d94219e Allow to check whether a function is available on the AliasesLoader wrapper
|
||||
* 915d94219e Allow checking whether a function is available on the AliasesLoader wrapper
|
||||
|
||||
* 10eb7b7a79 Merge pull request `#42368`_ from twangboy/win_fix_build_2016.11
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
112
doc/topics/releases/2017.7.4.rst
Normal file
112
doc/topics/releases/2017.7.4.rst
Normal file
|
@ -0,0 +1,112 @@
|
|||
===========================
|
||||
Salt 2017.7.4 Release Notes
|
||||
===========================
|
||||
|
||||
Version 2017.7.4 is a bugfix release for :ref:`2017.7.0 <release-2017-7-0>`.
|
||||
|
||||
Changes for v2017.7.3..v2017.7.4
|
||||
---------------------------------------------------------------
|
||||
|
||||
Extended changelog courtesy of Todd Stansell (https://github.com/tjstansell/salt-changelogs):
|
||||
|
||||
*Generated at: 2018-02-16T16:44:38Z*
|
||||
|
||||
Statistics:
|
||||
|
||||
- Total Merges: **7**
|
||||
- Total Issue references: **4**
|
||||
- Total PR references: **11**
|
||||
|
||||
Changes:
|
||||
|
||||
|
||||
- **PR** `#46066`_: (*rallytime*) Pin tornado version in requirements file
|
||||
@ *2018-02-16T16:40:05Z*
|
||||
|
||||
- **ISSUE** `#45790`_: (*bdarnell*) Test with Tornado 5.0b1
|
||||
| refs: `#46066`_
|
||||
* 32f3d00e44 Merge pull request `#46066`_ from rallytime/pin-tornado
|
||||
* 6dc1a3b9dc Pin tornado version in requirements file
|
||||
|
||||
- **PR** `#46036`_: (*terminalmage*) git.latest: Fix regression with identity file usage
|
||||
@ *2018-02-16T13:57:23Z*
|
||||
|
||||
* 85761ee650 Merge pull request `#46036`_ from terminalmage/issue43769
|
||||
* e2140d9a84 Mock the ssh.key_is_encrypted utils func
|
||||
|
||||
* 169924b3fe Move ssh.key_is_encrypted to a utils module temporarily
|
||||
|
||||
* 54f4d78f7a Only keep ssh.py in the Windows installer
|
||||
|
||||
* 5f04531e1b Keep ssh state and execution modules in the installer
|
||||
|
||||
* f2b69f703d git.latest: Fix regression with identity file usage
|
||||
|
||||
- **PR** `#46009`_: (*Ch3LL*) Add 2017.7.4 Release Notes with PRs
|
||||
@ *2018-02-13T16:40:30Z*
|
||||
|
||||
* 6d534c6e7e Merge pull request `#46009`_ from Ch3LL/rn_7.4
|
||||
* ac0baf4b34 Add 2017.7.4 Release Notes with PRs
|
||||
|
||||
- **PR** `#45981`_: (*gtmanfred*) use local config for vault when masterless
|
||||
@ *2018-02-13T15:22:01Z*
|
||||
|
||||
- **ISSUE** `#45976`_: (*grobinson-blockchain*) 6a5e0f9 introduces regression that breaks Vault module for salt masterless
|
||||
| refs: `#45981`_
|
||||
* ca76a0b328 Merge pull request `#45981`_ from gtmanfred/2017.7.3
|
||||
* 0d448457dc apparently local is not set by default
|
||||
|
||||
* 2a92f4bc16 use local config for vault when masterless
|
||||
|
||||
- **PR** `#45953`_: (*rallytime*) Back-port `#45928`_ to 2017.7.3
|
||||
@ *2018-02-09T22:29:10Z*
|
||||
|
||||
- **ISSUE** `#45915`_: (*MatthiasKuehneEllerhold*) 2017.7.3: Salt-SSH & Vault Pillar: Permission denied "minion.pem"
|
||||
| refs: `#45928`_
|
||||
- **PR** `#45928`_: (*garethgreenaway*) [2017.7] Fixing vault when used with pillar over salt-ssh
|
||||
| refs: `#45953`_
|
||||
* 6530649dbc Merge pull request `#45953`_ from rallytime/`bp-45928`_-2017.7.3
|
||||
* 85363189d1 Fixing vault when used with pillar over salt-ssh
|
||||
|
||||
- **PR** `#45934`_: (*rallytime*) Back-port `#45902`_ to 2017.7.3
|
||||
@ *2018-02-09T16:31:08Z*
|
||||
|
||||
- **ISSUE** `#45893`_: (*CrackerJackMack*) archive.extracted ValueError "No path specified" in 2017.7.3
|
||||
| refs: `#45902`_
|
||||
- **PR** `#45902`_: (*terminalmage*) Check the effective saltenv for cached archive
|
||||
| refs: `#45934`_
|
||||
* fb378cebb0 Merge pull request `#45934`_ from rallytime/`bp-45902`_
|
||||
* bb83e8b345 Add regression test for issue 45893
|
||||
|
||||
* cdda66d759 Remove duplicated section in docstring and fix example
|
||||
|
||||
* 4b6351cda6 Check the effective saltenv for cached archive
|
||||
|
||||
- **PR** `#45935`_: (*rallytime*) Back-port `#45742`_ to 2017.7.3
|
||||
@ *2018-02-09T14:02:26Z*
|
||||
|
||||
- **PR** `#45742`_: (*marccardinal*) list.copy() is not compatible with python 2.7
|
||||
| refs: `#45935`_
|
||||
* 0d74151c71 Merge pull request `#45935`_ from rallytime/`bp-45742`_
|
||||
* 6a0b5f7af3 Removed the chained copy
|
||||
|
||||
* ad1150fad4 list.copy() is not compatible with python 2.7
|
||||
|
||||
|
||||
.. _`#45742`: https://github.com/saltstack/salt/pull/45742
|
||||
.. _`#45790`: https://github.com/saltstack/salt/issues/45790
|
||||
.. _`#45893`: https://github.com/saltstack/salt/issues/45893
|
||||
.. _`#45902`: https://github.com/saltstack/salt/pull/45902
|
||||
.. _`#45915`: https://github.com/saltstack/salt/issues/45915
|
||||
.. _`#45928`: https://github.com/saltstack/salt/pull/45928
|
||||
.. _`#45934`: https://github.com/saltstack/salt/pull/45934
|
||||
.. _`#45935`: https://github.com/saltstack/salt/pull/45935
|
||||
.. _`#45953`: https://github.com/saltstack/salt/pull/45953
|
||||
.. _`#45976`: https://github.com/saltstack/salt/issues/45976
|
||||
.. _`#45981`: https://github.com/saltstack/salt/pull/45981
|
||||
.. _`#46009`: https://github.com/saltstack/salt/pull/46009
|
||||
.. _`#46036`: https://github.com/saltstack/salt/pull/46036
|
||||
.. _`#46066`: https://github.com/saltstack/salt/pull/46066
|
||||
.. _`bp-45742`: https://github.com/saltstack/salt/pull/45742
|
||||
.. _`bp-45902`: https://github.com/saltstack/salt/pull/45902
|
||||
.. _`bp-45928`: https://github.com/saltstack/salt/pull/45928
|
2058
doc/topics/releases/2017.7.5.rst
Normal file
2058
doc/topics/releases/2017.7.5.rst
Normal file
File diff suppressed because it is too large
Load diff
15
doc/topics/releases/2017.7.6.rst
Normal file
15
doc/topics/releases/2017.7.6.rst
Normal file
|
@ -0,0 +1,15 @@
|
|||
===========================
|
||||
Salt 2017.7.6 Release Notes
|
||||
===========================
|
||||
|
||||
Version 2017.7.6 is a bugfix release for :ref:`2017.7.0 <release-2017-7-0>`.
|
||||
|
||||
Option to Return to Previous Pillar Include Behavior
|
||||
----------------------------------------------------
|
||||
|
||||
Prior to version 2017.7.3, keys from :ref:`pillar includes <pillar-include>`
|
||||
would be merged on top of the pillar SLS. Since 2017.7.3, the includes are
|
||||
merged together and then the pillar SLS is merged on top of that.
|
||||
|
||||
The :conf_master:`pillar_includes_override_sls` option has been added allow
|
||||
users to switch back to the pre-2017.7.3 behavior.
|
|
@ -178,7 +178,7 @@ that the text following it can be evaluated properly.
|
|||
|
||||
local States
|
||||
~~~~~~~~~~~~
|
||||
``local`` states are evaluated locally; this is analagous to issuing a state
|
||||
``local`` states are evaluated locally; this is analogous to issuing a state
|
||||
run using a ``salt-call --local`` command. These commands will be issued on the
|
||||
local machine running the ``spm`` command, whether that machine is a master or
|
||||
a minion.
|
||||
|
|
|
@ -13,6 +13,12 @@ to ``tcp`` on each Salt minion and Salt master.
|
|||
|
||||
transport: tcp
|
||||
|
||||
.. warning::
|
||||
|
||||
We currently recommend that when using Syndics that all Masters and Minions
|
||||
use the same transport. We're investigating a report of an error when using
|
||||
mixed transport types at very heavy loads.
|
||||
|
||||
Wire Protocol
|
||||
=============
|
||||
This implementation over TCP focuses on flexibility over absolute efficiency.
|
||||
|
|
|
@ -103,8 +103,8 @@ RedHat Pygit2 Issues
|
|||
|
||||
The release of RedHat/CentOS 7.3 upgraded both ``python-cffi`` and
|
||||
``http-parser``, both of which are dependencies for pygit2_/libgit2_. Both
|
||||
pygit2_ and libgit2_ (which are from the EPEL repository and not managed
|
||||
directly by RedHat) need to be rebuilt against these updated dependencies.
|
||||
``pygit2`` and ``libgit2`` packages (which are from the EPEL repository) should
|
||||
be upgraded to the most recent versions, at least to ``0.24.2``.
|
||||
|
||||
The below errors will show up in the master log if an incompatible
|
||||
``python-pygit2`` package is installed:
|
||||
|
@ -123,30 +123,8 @@ package is installed:
|
|||
|
||||
2017-02-15 18:04:45,211 [salt.utils.gitfs ][ERROR ][6211] Error occurred fetching gitfs remote 'https://foo.com/bar.git': No Content-Type header in response
|
||||
|
||||
As of 15 February 2017, ``python-pygit2`` has been rebuilt and is in the stable
|
||||
EPEL repository. However, ``libgit2`` remains broken (a `bug report`_ has been
|
||||
filed to get it rebuilt).
|
||||
|
||||
In the meantime, you can work around this by downgrading ``http-parser``. To do
|
||||
this, go to `this page`_ and download the appropriate ``http-parser`` RPM for
|
||||
the OS architecture you are using (x86_64, etc.). Then downgrade using the
|
||||
``rpm`` command. For example:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
[root@784e8a8c5028 /]# curl --silent -O https://kojipkgs.fedoraproject.org//packages/http-parser/2.0/5.20121128gitcd01361.el7/x86_64/http-parser-2.0-5.20121128gitcd01361.el7.x86_64.rpm
|
||||
[root@784e8a8c5028 /]# rpm -Uvh --oldpackage http-parser-2.0-5.20121128gitcd01361.el7.x86_64.rpm
|
||||
Preparing... ################################# [100%]
|
||||
Updating / installing...
|
||||
1:http-parser-2.0-5.20121128gitcd01################################# [ 50%]
|
||||
Cleaning up / removing...
|
||||
2:http-parser-2.7.1-3.el7 ################################# [100%]
|
||||
|
||||
A restart of the salt-master daemon may be required to allow http(s)
|
||||
repositories to continue to be fetched.
|
||||
|
||||
.. _`this page`: https://koji.fedoraproject.org/koji/buildinfo?buildID=703753
|
||||
.. _`bug report`: https://bugzilla.redhat.com/show_bug.cgi?id=1422583
|
||||
A restart of the ``salt-master`` daemon and gitfs cache directory clean up may
|
||||
be required to allow http(s) repositories to continue to be fetched.
|
||||
|
||||
|
||||
GitPython
|
||||
|
|
|
@ -302,25 +302,30 @@ can define multiple versions for the same piece of software. The lines following
|
|||
the version are indented two more spaces and contain all the information needed
|
||||
to install that package.
|
||||
|
||||
.. warning:: The package name and the ``full_name`` must be unique to all
|
||||
other packages in the software repository.
|
||||
.. warning::
|
||||
The package name and the ``full_name`` must be unique to all other packages
|
||||
in the software repository.
|
||||
|
||||
The version line is the version for the package to be installed. It is used when
|
||||
you need to install a specific version of a piece of software.
|
||||
|
||||
.. warning:: The version must be enclosed in quotes, otherwise the yaml parser
|
||||
will remove trailing zeros.
|
||||
.. warning::
|
||||
The version must be enclosed in quotes, otherwise the yaml parser will
|
||||
remove trailing zeros.
|
||||
|
||||
.. note::
|
||||
There are unique situations where previous versions are unavailable. Take
|
||||
Google Chrome for example. There is only one url provided for a standalone
|
||||
installation of Google Chrome.
|
||||
|
||||
.. note:: There are unique situations where previous versions are unavailable.
|
||||
Take Google Chrome for example. There is only one url provided for a
|
||||
standalone installation of Google Chrome.
|
||||
(https://dl.google.com/edgedl/chrome/install/GoogleChromeStandaloneEnterprise.msi)
|
||||
|
||||
When a new version is released, the url just points to the new version. To
|
||||
handle situations such as these, set the version to `latest`. Salt will
|
||||
install the version of Chrome at the URL and report that version. Here's an
|
||||
example:
|
||||
|
||||
.. code-block:: bash
|
||||
.. code-block:: yaml
|
||||
|
||||
chrome:
|
||||
latest:
|
||||
|
@ -335,200 +340,237 @@ you need to install a specific version of a piece of software.
|
|||
|
||||
Available parameters are as follows:
|
||||
|
||||
:param str full_name: The Full Name for the software as shown in "Programs and
|
||||
Features" in the control panel. You can also get this information by
|
||||
installing the package manually and then running ``pkg.list_pkgs``. Here's
|
||||
an example of the output from ``pkg.list_pkgs``:
|
||||
:param str full_name:
|
||||
The Full Name for the software as shown in "Programs and Features" in the
|
||||
control panel. You can also get this information by installing the package
|
||||
manually and then running ``pkg.list_pkgs``. Here's an example of the output
|
||||
from ``pkg.list_pkgs``:
|
||||
|
||||
.. code-block:: bash
|
||||
.. code-block:: bash
|
||||
|
||||
salt 'test-2008' pkg.list_pkgs
|
||||
test-2008
|
||||
----------
|
||||
7-Zip 9.20 (x64 edition):
|
||||
9.20.00.0
|
||||
Microsoft .NET Framework 4 Client Profile:
|
||||
4.0.30319,4.0.30319
|
||||
Microsoft .NET Framework 4 Extended:
|
||||
4.0.30319,4.0.30319
|
||||
Microsoft Visual C++ 2008 Redistributable - x64 9.0.21022:
|
||||
9.0.21022
|
||||
Mozilla Firefox 17.0.1 (x86 en-US):
|
||||
17.0.1
|
||||
Mozilla Maintenance Service:
|
||||
17.0.1
|
||||
NSClient++ (x64):
|
||||
0.3.8.76
|
||||
Notepad++:
|
||||
6.4.2
|
||||
Salt Minion 0.16.0:
|
||||
0.16.0
|
||||
salt 'test-2008' pkg.list_pkgs
|
||||
test-2008
|
||||
----------
|
||||
7-Zip 9.20 (x64 edition):
|
||||
9.20.00.0
|
||||
Microsoft .NET Framework 4 Client Profile:
|
||||
4.0.30319,4.0.30319
|
||||
Microsoft .NET Framework 4 Extended:
|
||||
4.0.30319,4.0.30319
|
||||
Microsoft Visual C++ 2008 Redistributable - x64 9.0.21022:
|
||||
9.0.21022
|
||||
Mozilla Firefox 17.0.1 (x86 en-US):
|
||||
17.0.1
|
||||
Mozilla Maintenance Service:
|
||||
17.0.1
|
||||
NSClient++ (x64):
|
||||
0.3.8.76
|
||||
Notepad++:
|
||||
6.4.2
|
||||
Salt Minion 0.16.0:
|
||||
0.16.0
|
||||
|
||||
Notice the Full Name for Firefox: Mozilla Firefox 17.0.0 (x86 en-US). That's
|
||||
exactly what's in the ``full_name`` parameter in the software definition file.
|
||||
Notice the Full Name for Firefox: ``Mozilla Firefox 17.0.0 (x86 en-US)``.
|
||||
That's exactly what's in the ``full_name`` parameter in the software
|
||||
definition file.
|
||||
|
||||
If any of the software insalled on the machine matches one of the software
|
||||
definition files in the repository the full_name will be automatically renamed
|
||||
to the package name. The example below shows the ``pkg.list_pkgs`` for a
|
||||
machine that already has Mozilla Firefox 17.0.1 installed.
|
||||
If any of the software installed on the machine matches one of the software
|
||||
definition files in the repository, the full_name will be automatically
|
||||
renamed to the package name. The example below shows the ``pkg.list_pkgs``
|
||||
for a machine that already has Mozilla Firefox 17.0.1 installed.
|
||||
|
||||
.. code-block:: bash
|
||||
.. code-block:: bash
|
||||
|
||||
test-2008:
|
||||
----------
|
||||
7zip:
|
||||
9.20.00.0
|
||||
Microsoft .NET Framework 4 Client Profile:
|
||||
4.0.30319,4.0.30319
|
||||
Microsoft .NET Framework 4 Extended:
|
||||
4.0.30319,4.0.30319
|
||||
Microsoft Visual C++ 2008 Redistributable - x64 9.0.21022:
|
||||
9.0.21022
|
||||
Mozilla Maintenance Service:
|
||||
17.0.1
|
||||
Notepad++:
|
||||
6.4.2
|
||||
Salt Minion 0.16.0:
|
||||
0.16.0
|
||||
firefox:
|
||||
17.0.1
|
||||
nsclient:
|
||||
0.3.9.328
|
||||
|
||||
.. important::
|
||||
The version number and ``full_name`` need to match the output from
|
||||
``pkg.list_pkgs`` so that the status can be verified when running a
|
||||
highstate.
|
||||
|
||||
.. note::
|
||||
It is still possible to successfully install packages using
|
||||
``pkg.install``, even if the ``full_name`` or the version number don't
|
||||
match. However, this can make troubleshooting issues difficult, so be
|
||||
careful.
|
||||
|
||||
.. tip::
|
||||
To force salt to display the full name when there's already an existing
|
||||
package definition file on the system, you can pass a bogus ``saltenv``
|
||||
parameter to the command like so: ``pkg.list_pkgs saltenv=NotARealEnv``
|
||||
|
||||
:param str installer:
|
||||
The path to the ``.exe`` or ``.msi`` to use to install the package. This can
|
||||
be a path or a URL. If it is a URL or a salt path (``salt://``), the package
|
||||
will be cached locally and then executed. If it is a path to a file on disk
|
||||
or a file share, it will be executed directly.
|
||||
|
||||
.. note::
|
||||
If storing software in the same location as the winrepo it is best
|
||||
practice to place each installer in its own directory rather than the
|
||||
root of winrepo. Then you can place your package definition file in the
|
||||
same directory. It is best practice to name the file ``init.sls``. This
|
||||
will be picked up by ``pkg.refresh_db`` and processed properly.
|
||||
|
||||
:param str install_flags:
|
||||
Any flags that need to be passed to the installer to make it perform a
|
||||
silent install. These can often be found by adding ``/?`` or ``/h`` when
|
||||
running the installer from the command-line. A great resource for finding
|
||||
these silent install flags can be found on the WPKG project's wiki_:
|
||||
|
||||
.. warning::
|
||||
Salt will not return if the installer is waiting for user input so it is
|
||||
imperative that the software package being installed has the ability to
|
||||
install silently.
|
||||
|
||||
:param str uninstaller:
|
||||
The path to the program used to uninstall this software. This can be the
|
||||
path to the same `exe` or `msi` used to install the software. It can also be
|
||||
a GUID. You can find this value in the registry under the following keys:
|
||||
|
||||
- Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall
|
||||
- Software\\Wow6432None\\Microsoft\\Windows\\CurrentVersion\\Uninstall
|
||||
|
||||
:param str uninstall_flags:
|
||||
Any flags that need to be passed to the uninstaller to make it perform a
|
||||
silent uninstall. These can often be found by adding ``/?`` or ``/h`` when
|
||||
running the uninstaller from the command-line. A great resource for finding
|
||||
these silent install flags can be found on the WPKG project's wiki_:
|
||||
|
||||
.. warning::
|
||||
Salt will not return if the uninstaller is waiting for user input so it
|
||||
is imperative that the software package being uninstalled has the
|
||||
ability to uninstall silently.
|
||||
|
||||
Here are some examples of installer and uninstaller settings:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
test-2008:
|
||||
----------
|
||||
7zip:
|
||||
9.20.00.0
|
||||
Microsoft .NET Framework 4 Client Profile:
|
||||
4.0.30319,4.0.30319
|
||||
Microsoft .NET Framework 4 Extended:
|
||||
4.0.30319,4.0.30319
|
||||
Microsoft Visual C++ 2008 Redistributable - x64 9.0.21022:
|
||||
9.0.21022
|
||||
Mozilla Maintenance Service:
|
||||
17.0.1
|
||||
Notepad++:
|
||||
6.4.2
|
||||
Salt Minion 0.16.0:
|
||||
0.16.0
|
||||
firefox:
|
||||
17.0.1
|
||||
nsclient:
|
||||
0.3.9.328
|
||||
'9.20.00.0':
|
||||
installer: salt://win/repo/7zip/7z920-x64.msi
|
||||
full_name: 7-Zip 9.20 (x64 edition)
|
||||
reboot: False
|
||||
install_flags: '/qn /norestart'
|
||||
msiexec: True
|
||||
uninstaller: '{23170F69-40C1-2702-0920-000001000000}'
|
||||
uninstall_flags: '/qn /norestart'
|
||||
|
||||
.. important:: The version number and ``full_name`` need to match the output
|
||||
from ``pkg.list_pkgs`` so that the status can be verified when running
|
||||
highstate.
|
||||
Alternatively the ``uninstaller`` can also simply repeat the URL of an msi
|
||||
file:
|
||||
|
||||
.. note:: It is still possible to successfully install packages using
|
||||
``pkg.install`` even if they don't match. This can make troubleshooting
|
||||
difficult so be careful.
|
||||
.. code-block:: yaml
|
||||
|
||||
:param str installer: The path to the ``.exe`` or ``.msi`` to use to install the
|
||||
package. This can be a path or a URL. If it is a URL or a salt path
|
||||
(salt://), the package will be cached locally and then executed. If it is a
|
||||
path to a file on disk or a file share, it will be executed directly.
|
||||
7zip:
|
||||
'9.20.00.0':
|
||||
installer: salt://win/repo/7zip/7z920-x64.msi
|
||||
full_name: 7-Zip 9.20 (x64 edition)
|
||||
reboot: False
|
||||
install_flags: '/qn /norestart'
|
||||
msiexec: True
|
||||
uninstaller: salt://win/repo/7zip/7z920-x64.msi
|
||||
uninstall_flags: '/qn /norestart'
|
||||
|
||||
:param str install_flags: Any flags that need to be passed to the installer to
|
||||
make it perform a silent install. These can often be found by adding ``/?``
|
||||
or ``/h`` when running the installer from the command-line. A great resource
|
||||
for finding these silent install flags can be found on the WPKG project's wiki_:
|
||||
:param msiexec:
|
||||
This tells salt to use ``msiexec /i`` to install the package and
|
||||
``msiexec /x`` to uninstall. This is for ``.msi`` installations. Possible
|
||||
options are: True, False or the path to ``msiexec.exe`` on your system
|
||||
|
||||
Salt will not return if the installer is waiting for user input so these are
|
||||
important.
|
||||
.. code-block:: yaml
|
||||
|
||||
:param str uninstaller: The path to the program used to uninstall this software.
|
||||
This can be the path to the same `exe` or `msi` used to install the
|
||||
software. It can also be a GUID. You can find this value in the registry
|
||||
under the following keys:
|
||||
7zip:
|
||||
'9.20.00.0':
|
||||
installer: salt://win/repo/7zip/7z920-x64.msi
|
||||
full_name: 7-Zip 9.20 (x64 edition)
|
||||
reboot: False
|
||||
install_flags: '/qn /norestart'
|
||||
msiexec: 'C:\Windows\System32\msiexec.exe'
|
||||
uninstaller: salt://win/repo/7zip/7z920-x64.msi
|
||||
uninstall_flags: '/qn /norestart'
|
||||
|
||||
- Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall
|
||||
- Software\\Wow6432None\\Microsoft\\Windows\\CurrentVersion\\Uninstall
|
||||
:param bool allusers:
|
||||
This parameter is specific to ``.msi`` installations. It tells ``msiexec``
|
||||
to install the software for all users. The default is ``True``.
|
||||
|
||||
:param str uninstall_flags: Any flags that need to be passed to the uninstaller
|
||||
to make it perform a silent uninstall. These can often be found by adding
|
||||
``/?`` or ``/h`` when running the uninstaller from the command-line. A great
|
||||
resource for finding these silent install flags can be found on the WPKG
|
||||
project's wiki_:
|
||||
:param bool cache_dir:
|
||||
If ``True`` and the installer URL begins with ``salt://``, the entire
|
||||
directory where the installer resides will be recursively cached. This is
|
||||
useful for installers that depend on other files in the same directory for
|
||||
installation.
|
||||
|
||||
Salt will not return if the uninstaller is waiting for user input so these are
|
||||
important.
|
||||
|
||||
Here are some examples of installer and uninstaller settings:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
7zip:
|
||||
'9.20.00.0':
|
||||
installer: salt://win/repo/7zip/7z920-x64.msi
|
||||
full_name: 7-Zip 9.20 (x64 edition)
|
||||
reboot: False
|
||||
install_flags: '/qn /norestart'
|
||||
msiexec: True
|
||||
uninstaller: '{23170F69-40C1-2702-0920-000001000000}'
|
||||
uninstall_flags: '/qn /norestart'
|
||||
|
||||
Alternatively the ``uninstaller`` can also simply repeat the URL of the msi file.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
7zip:
|
||||
'9.20.00.0':
|
||||
installer: salt://win/repo/7zip/7z920-x64.msi
|
||||
full_name: 7-Zip 9.20 (x64 edition)
|
||||
reboot: False
|
||||
install_flags: '/qn /norestart'
|
||||
msiexec: True
|
||||
uninstaller: salt://win/repo/7zip/7z920-x64.msi
|
||||
uninstall_flags: '/qn /norestart'
|
||||
|
||||
:param msiexec: This tells salt to use ``msiexec /i`` to install the
|
||||
package and ``msiexec /x`` to uninstall. This is for `.msi` installations.
|
||||
Possible options are: True, False or path to msiexec on your system
|
||||
|
||||
7zip:
|
||||
'9.20.00.0':
|
||||
installer: salt://win/repo/7zip/7z920-x64.msi
|
||||
full_name: 7-Zip 9.20 (x64 edition)
|
||||
reboot: False
|
||||
install_flags: '/qn /norestart'
|
||||
msiexec: 'C:\Windows\System32\msiexec.exe'
|
||||
uninstaller: salt://win/repo/7zip/7z920-x64.msi
|
||||
uninstall_flags: '/qn /norestart'
|
||||
|
||||
:param str arch: This selects which ``msiexec.exe`` to use. Possible values:
|
||||
``x86``, ``x64``
|
||||
|
||||
:param bool allusers: This parameter is specific to `.msi` installations. It
|
||||
tells `msiexec` to install the software for all users. The default is True.
|
||||
|
||||
:param bool cache_dir: If true when installer URL begins with salt://, the
|
||||
entire directory where the installer resides will be recursively cached.
|
||||
This is useful for installers that depend on other files in the same
|
||||
directory for installation.
|
||||
.. warning::
|
||||
Be aware that all files and directories in the same location as the
|
||||
installer file will be copied down to the minion. If you place your
|
||||
installer file in the root of winrepo (``/srv/salt/win/repo-ng``) and
|
||||
``cache_dir: True`` the entire contents of winrepo will be cached to
|
||||
the minion. Therefore, it is best practice to place your installer files
|
||||
in a subdirectory if they are to be stored in winrepo.
|
||||
|
||||
:param str cache_file:
|
||||
When installer URL begins with salt://, this indicates single file to copy
|
||||
down for use with the installer. Copied to the same location as the
|
||||
installer. Use this over ``cache_dir`` if there are many files in the
|
||||
When the installer URL begins with ``salt://``, this indicates a single file
|
||||
to copy down for use with the installer. It is copied to the same location
|
||||
as the installer. Use this over ``cache_dir`` if there are many files in the
|
||||
directory and you only need a specific file and don't want to cache
|
||||
additional files that may reside in the installer directory.
|
||||
|
||||
Here's an example for a software package that has dependent files:
|
||||
Here's an example for a software package that has dependent files:
|
||||
|
||||
.. code-block:: yaml
|
||||
.. code-block:: yaml
|
||||
|
||||
sqlexpress:
|
||||
'12.0.2000.8':
|
||||
installer: 'salt://win/repo/sqlexpress/setup.exe'
|
||||
full_name: Microsoft SQL Server 2014 Setup (English)
|
||||
reboot: False
|
||||
install_flags: '/ACTION=install /IACCEPTSQLSERVERLICENSETERMS /Q'
|
||||
cache_dir: True
|
||||
sqlexpress:
|
||||
'12.0.2000.8':
|
||||
installer: 'salt://win/repo/sqlexpress/setup.exe'
|
||||
full_name: Microsoft SQL Server 2014 Setup (English)
|
||||
reboot: False
|
||||
install_flags: '/ACTION=install /IACCEPTSQLSERVERLICENSETERMS /Q'
|
||||
cache_dir: True
|
||||
|
||||
:param bool use_scheduler: If true, windows will use the task scheduler to run
|
||||
the installation. This is useful for running the salt installation itself as
|
||||
the installation process kills any currently running instances of salt.
|
||||
:param bool use_scheduler:
|
||||
If ``True``, Windows will use the task scheduler to run the installation.
|
||||
This is useful for running the Salt installation itself as the installation
|
||||
process kills any currently running instances of Salt.
|
||||
|
||||
:param str source_hash: This tells salt to compare a hash sum of the installer
|
||||
to the provided hash sum before execution. The value can be formatted as
|
||||
``hash_algorithm=hash_sum``, or it can be a URI to a file containing the hash
|
||||
sum.
|
||||
For a list of supported algorithms, see the `hashlib documentation
|
||||
<https://docs.python.org/2/library/hashlib.html>`_.
|
||||
:param str source_hash:
|
||||
This tells Salt to compare a hash sum of the installer to the provided hash
|
||||
sum before execution. The value can be formatted as
|
||||
``<hash_algorithm>=<hash_sum>``, or it can be a URI to a file containing the
|
||||
hash sum.
|
||||
|
||||
Here's an example of source_hash usage:
|
||||
For a list of supported algorithms, see the `hashlib documentation
|
||||
<https://docs.python.org/2/library/hashlib.html>`_.
|
||||
|
||||
.. code-block:: yaml
|
||||
Here's an example of source_hash usage:
|
||||
|
||||
messageanalyzer:
|
||||
'4.0.7551.0':
|
||||
full_name: 'Microsoft Message Analyzer'
|
||||
installer: 'salt://win/repo/messageanalyzer/MessageAnalyzer64.msi'
|
||||
install_flags: '/quiet /norestart'
|
||||
uninstaller: '{1CC02C23-8FCD-487E-860C-311EC0A0C933}'
|
||||
uninstall_flags: '/quiet /norestart'
|
||||
msiexec: True
|
||||
source_hash: 'sha1=62875ff451f13b10a8ff988f2943e76a4735d3d4'
|
||||
.. code-block:: yaml
|
||||
|
||||
messageanalyzer:
|
||||
'4.0.7551.0':
|
||||
full_name: 'Microsoft Message Analyzer'
|
||||
installer: 'salt://win/repo/messageanalyzer/MessageAnalyzer64.msi'
|
||||
install_flags: '/quiet /norestart'
|
||||
uninstaller: '{1CC02C23-8FCD-487E-860C-311EC0A0C933}'
|
||||
uninstall_flags: '/quiet /norestart'
|
||||
msiexec: True
|
||||
source_hash: 'sha1=62875ff451f13b10a8ff988f2943e76a4735d3d4'
|
||||
|
||||
:param bool reboot: Not implemented
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ After=network.target salt-master.service
|
|||
|
||||
[Service]
|
||||
Type=notify
|
||||
KillMode=process
|
||||
NotifyAccess=all
|
||||
LimitNOFILE=8192
|
||||
ExecStart=/usr/bin/salt-minion
|
||||
|
|
|
@ -4,7 +4,7 @@ Documentation=man:salt-master(1) file:///usr/share/doc/salt/html/contents.html h
|
|||
After=network.target
|
||||
|
||||
[Service]
|
||||
LimitNOFILE=16384
|
||||
LimitNOFILE=100000
|
||||
Type=notify
|
||||
NotifyAccess=all
|
||||
ExecStart=/usr/bin/salt-master
|
||||
|
|
|
@ -4,6 +4,7 @@ Documentation=man:salt-minion(1) file:///usr/share/doc/salt/html/contents.html h
|
|||
After=network.target salt-master.service
|
||||
|
||||
[Service]
|
||||
KillMode=process
|
||||
Type=notify
|
||||
NotifyAccess=all
|
||||
LimitNOFILE=8192
|
||||
|
|
|
@ -6,6 +6,7 @@ After=network.target
|
|||
[Service]
|
||||
User=salt
|
||||
Type=simple
|
||||
Environment=SHELL=/bin/bash
|
||||
LimitNOFILE=8192
|
||||
ExecStart=/usr/bin/salt-api
|
||||
TimeoutStopSec=3
|
||||
|
|
|
@ -1042,7 +1042,7 @@ Thu Sep 19 17:18:06 UTC 2013 - aboe76@gmail.com
|
|||
* salt-ssh requires sshpass
|
||||
* salt-syndic requires salt-master
|
||||
Minor features:
|
||||
- 0.17.0 release wil be last release for 0.XX.X numbering system
|
||||
- 0.17.0 release will be last release for 0.XX.X numbering system
|
||||
Next release will be <Year>.<Month>.<Minor>
|
||||
|
||||
-------------------------------------------------------------------
|
||||
|
|
|
@ -206,7 +206,7 @@ if ( ! [bool]$Env:SALT_PIP_LOCAL_CACHE) {
|
|||
Start_Process_and_test_exitcode "$($ini['Settings']['Python2Dir'])\python.exe" "-m pip download --dest $Env:SALT_PIP_LOCAL_CACHE -r $($script_path)\req_pip.txt" "pip download"
|
||||
}
|
||||
Write-Output " reading from local pip cache $Env:SALT_PIP_LOCAL_CACHE"
|
||||
Write-Output " If a (new) ressource is missing, please delete all files in this cache, go online and repeat"
|
||||
Write-Output " If a (new) resource is missing, please delete all files in this cache, go online and repeat"
|
||||
Start_Process_and_test_exitcode "$($ini['Settings']['Python2Dir'])\python.exe" "-m pip install --no-index --find-links=$Env:SALT_PIP_LOCAL_CACHE -r $($script_path)\req_pip.txt" "pip install"
|
||||
}
|
||||
|
||||
|
@ -218,21 +218,26 @@ Write-Output " ----------------------------------------------------------------"
|
|||
Write-Output " - $script_name :: Installing pypi resources using pip . . ."
|
||||
Write-Output " ----------------------------------------------------------------"
|
||||
if ( ! [bool]$Env:SALT_REQ_LOCAL_CACHE) {
|
||||
Start_Process_and_test_exitcode "$($ini['Settings']['Scripts2Dir'])\pip.exe" "--no-cache-dir install -r $($script_path)\req_2.txt" "pip install"
|
||||
Start_Process_and_test_exitcode "$($ini['Settings']['Scripts2Dir'])\pip.exe" "--no-cache-dir install -r $($script_path)\req.txt" "pip install"
|
||||
} else {
|
||||
if ( (Get-ChildItem $Env:SALT_REQ_LOCAL_CACHE | Measure-Object).Count -eq 0 ) {
|
||||
# folder empty
|
||||
Write-Output " pip download from req_2.txt into empty local cache SALT_REQ $Env:SALT_REQ_LOCAL_CACHE"
|
||||
Start_Process_and_test_exitcode "$($ini['Settings']['Python2Dir'])\python.exe" "-m pip download --dest $Env:SALT_REQ_LOCAL_CACHE -r $($script_path)\req_2.txt" "pip download"
|
||||
Write-Output " pip download from req.txt into empty local cache SALT_REQ $Env:SALT_REQ_LOCAL_CACHE"
|
||||
Start_Process_and_test_exitcode "$($ini['Settings']['Python2Dir'])\python.exe" "-m pip download --dest $Env:SALT_REQ_LOCAL_CACHE -r $($script_path)\req.txt" "pip download"
|
||||
}
|
||||
Write-Output " reading from local pip cache $Env:SALT_REQ_LOCAL_CACHE"
|
||||
Write-Output " If a (new) ressource is missing, please delete all files in this cache, go online and repeat"
|
||||
Start_Process_and_test_exitcode "$($ini['Settings']['Python2Dir'])\python.exe" "-m pip install --no-index --find-links=$Env:SALT_REQ_LOCAL_CACHE -r $($script_path)\req_2.txt" "pip install"
|
||||
Write-Output " If a (new) resource is missing, please delete all files in this cache, go online and repeat"
|
||||
Start_Process_and_test_exitcode "$($ini['Settings']['Python2Dir'])\python.exe" "-m pip install --no-index --find-links=$Env:SALT_REQ_LOCAL_CACHE -r $($script_path)\req.txt" "pip install"
|
||||
}
|
||||
|
||||
#==============================================================================
|
||||
# Move PyWin32 DLL's to site-packages\win32
|
||||
# Cleaning Up PyWin32
|
||||
#==============================================================================
|
||||
Write-Output " ----------------------------------------------------------------"
|
||||
Write-Output " - $script_name :: Cleaning Up PyWin32 . . ."
|
||||
Write-Output " ----------------------------------------------------------------"
|
||||
|
||||
# Move DLL's to Python Root
|
||||
Write-Output " - $script_name :: Moving PyWin32 DLLs . . ."
|
||||
Move-Item "$($ini['Settings']['SitePkgs2Dir'])\pywin32_system32\*.dll" "$($ini['Settings']['SitePkgs2Dir'])\win32" -Force
|
||||
|
||||
|
@ -248,37 +253,6 @@ Remove-Item "$($ini['Settings']['SitePkgs2Dir'])\pythonwin" -Force -Recurse
|
|||
Write-Output " - $script_name :: Removing PyWin32 scripts . . ."
|
||||
Remove-Item "$($ini['Settings']['Scripts2Dir'])\pywin32_*" -Force -Recurse
|
||||
|
||||
#==============================================================================
|
||||
# Install PyYAML with CLoader
|
||||
# This has to be a compiled binary to get the CLoader
|
||||
#==============================================================================
|
||||
Write-Output " ----------------------------------------------------------------"
|
||||
Write-Output " - $script_name :: Installing PyYAML . . ."
|
||||
Write-Output " ----------------------------------------------------------------"
|
||||
# Download
|
||||
$file = "$($ini[$bitPrograms]['PyYAML2'])"
|
||||
$url = "$($ini['Settings']['SaltRepo'])/$bitFolder/$file"
|
||||
$file = "$($ini['Settings']['DownloadDir'])\$bitFolder\$file"
|
||||
DownloadFileWithProgress $url $file
|
||||
|
||||
# Install
|
||||
Start_Process_and_test_exitcode "$($ini['Settings']['Scripts2Dir'])\easy_install.exe" "-Z $file " "easy_install PyYAML"
|
||||
|
||||
#==============================================================================
|
||||
# Install PyCrypto from wheel file
|
||||
#==============================================================================
|
||||
Write-Output " ----------------------------------------------------------------"
|
||||
Write-Output " - $script_name :: Installing PyCrypto . . ."
|
||||
Write-Output " ----------------------------------------------------------------"
|
||||
# Download
|
||||
$file = "$($ini[$bitPrograms]['PyCrypto2'])"
|
||||
$url = "$($ini['Settings']['SaltRepo'])/$bitFolder/$file"
|
||||
$file = "$($ini['Settings']['DownloadDir'])\$bitFolder\$file"
|
||||
DownloadFileWithProgress $url $file
|
||||
|
||||
# Install
|
||||
Start_Process_and_test_exitcode "$($ini['Settings']['Scripts2Dir'])\pip.exe" "install --no-index --find-links=$($ini['Settings']['DownloadDir']) $file " "pip install PyCrypto"
|
||||
|
||||
#==============================================================================
|
||||
# Copy DLLs to Python Directory
|
||||
#==============================================================================
|
||||
|
|
|
@ -191,7 +191,7 @@ If (!($Path.ToLower().Contains("$($ini['Settings']['Scripts3Dir'])".ToLower())))
|
|||
|
||||
#==============================================================================
|
||||
# Update PIP and SetupTools
|
||||
# caching depends on environmant variable SALT_PIP_LOCAL_CACHE
|
||||
# caching depends on environment variable SALT_PIP_LOCAL_CACHE
|
||||
#==============================================================================
|
||||
Write-Output " ----------------------------------------------------------------"
|
||||
Write-Output " - $script_name :: Updating PIP and SetupTools . . ."
|
||||
|
@ -206,44 +206,36 @@ if ( ! [bool]$Env:SALT_PIP_LOCAL_CACHE) {
|
|||
Start_Process_and_test_exitcode "$($ini['Settings']['Python3Dir'])\python.exe" "-m pip download --dest $Env:SALT_PIP_LOCAL_CACHE -r $($script_path)\req_pip.txt" "pip download"
|
||||
}
|
||||
Write-Output " reading from local pip cache $Env:SALT_PIP_LOCAL_CACHE"
|
||||
Write-Output " If a (new) ressource is missing, please delete all files in this cache, go online and repeat"
|
||||
Write-Output " If a (new) resource is missing, please delete all files in this cache, go online and repeat"
|
||||
Start_Process_and_test_exitcode "$($ini['Settings']['Python3Dir'])\python.exe" "-m pip install --no-index --find-links=$Env:SALT_PIP_LOCAL_CACHE -r $($script_path)\req_pip.txt" "pip install"
|
||||
}
|
||||
|
||||
#==============================================================================
|
||||
# Install pypi resources using pip
|
||||
# caching depends on environmant variable SALT_REQ_LOCAL_CACHE
|
||||
# caching depends on environment variable SALT_REQ_LOCAL_CACHE
|
||||
#==============================================================================
|
||||
Write-Output " ----------------------------------------------------------------"
|
||||
Write-Output " - $script_name :: Installing pypi resources using pip . . ."
|
||||
Write-Output " ----------------------------------------------------------------"
|
||||
if ( ! [bool]$Env:SALT_REQ_LOCAL_CACHE) {
|
||||
Start_Process_and_test_exitcode "$($ini['Settings']['Scripts3Dir'])\pip.exe" "--no-cache-dir install -r $($script_path)\req_3.txt" "pip install"
|
||||
Start_Process_and_test_exitcode "$($ini['Settings']['Scripts3Dir'])\pip.exe" "--no-cache-dir install -r $($script_path)\req.txt" "pip install"
|
||||
} else {
|
||||
if ( (Get-ChildItem $Env:SALT_REQ_LOCAL_CACHE | Measure-Object).Count -eq 0 ) {
|
||||
# folder empty
|
||||
Write-Output " pip download from req_3.txt into empty local cache SALT_REQ $Env:SALT_REQ_LOCAL_CACHE"
|
||||
Start_Process_and_test_exitcode "$($ini['Settings']['Python3Dir'])\python.exe" "-m pip download --dest $Env:SALT_REQ_LOCAL_CACHE -r $($script_path)\req_3.txt" "pip download"
|
||||
Write-Output " pip download from req.txt into empty local cache SALT_REQ $Env:SALT_REQ_LOCAL_CACHE"
|
||||
Start_Process_and_test_exitcode "$($ini['Settings']['Python3Dir'])\python.exe" "-m pip download --dest $Env:SALT_REQ_LOCAL_CACHE -r $($script_path)\req.txt" "pip download"
|
||||
}
|
||||
Write-Output " reading from local pip cache $Env:SALT_REQ_LOCAL_CACHE"
|
||||
Write-Output " If a (new) ressource is missing, please delete all files in this cache, go online and repeat"
|
||||
Start_Process_and_test_exitcode "$($ini['Settings']['Python3Dir'])\python.exe" "-m pip install --no-index --find-links=$Env:SALT_REQ_LOCAL_CACHE -r $($script_path)\req_3.txt" "pip install"
|
||||
Write-Output " If a (new) resource is missing, please delete all files in this cache, go online and repeat"
|
||||
Start_Process_and_test_exitcode "$($ini['Settings']['Python3Dir'])\python.exe" "-m pip install --no-index --find-links=$Env:SALT_REQ_LOCAL_CACHE -r $($script_path)\req.txt" "pip install"
|
||||
}
|
||||
|
||||
#==============================================================================
|
||||
# Install PyWin32 from wheel file
|
||||
# Cleaning Up PyWin32
|
||||
#==============================================================================
|
||||
Write-Output " ----------------------------------------------------------------"
|
||||
Write-Output " - $script_name :: Installing PyWin32 . . ."
|
||||
Write-Output " - $script_name :: Cleaning Up PyWin32 . . ."
|
||||
Write-Output " ----------------------------------------------------------------"
|
||||
# Download
|
||||
$file = "$($ini[$bitPrograms]['PyWin323'])"
|
||||
$url = "$($ini['Settings']['SaltRepo'])/$bitFolder/$file"
|
||||
$file = "$($ini['Settings']['DownloadDir'])\$bitFolder\$file"
|
||||
DownloadFileWithProgress $url $file
|
||||
|
||||
# Install
|
||||
Start_Process_and_test_exitcode "$($ini['Settings']['Scripts3Dir'])\pip.exe" "install --no-index --find-links=$($ini['Settings']['DownloadDir']) $file " "pip install PyWin32"
|
||||
|
||||
# Move DLL's to Python Root
|
||||
Write-Output " - $script_name :: Moving PyWin32 DLLs . . ."
|
||||
|
|
|
@ -113,6 +113,23 @@ xcopy /Q /Y "%SrcDir%\conf\master" "%CnfDir%\"
|
|||
xcopy /Q /Y "%SrcDir%\conf\minion" "%CnfDir%\"
|
||||
@echo.
|
||||
|
||||
@echo Copying NSSM to buildenv
|
||||
@echo ----------------------------------------------------------------------
|
||||
:: Make sure the "prereq" directory exists
|
||||
If NOT Exist "%PreDir%" mkdir "%PreDir%"
|
||||
|
||||
:: Set the location of the nssm to download
|
||||
Set Url64="https://repo.saltstack.com/windows/dependencies/64/nssm-2.24-101-g897c7ad.exe"
|
||||
Set Url32="https://repo.saltstack.com/windows/dependencies/32/nssm-2.24-101-g897c7ad.exe"
|
||||
|
||||
:: Check for 64 bit by finding the Program Files (x86) directory
|
||||
If Defined ProgramFiles(x86) (
|
||||
powershell -ExecutionPolicy RemoteSigned -File download_url_file.ps1 -url "%Url64%" -file "%BldDir%\nssm.exe"
|
||||
) Else (
|
||||
powershell -ExecutionPolicy RemoteSigned -File download_url_file.ps1 -url "%Url32%" -file "%BldDir%\nssm.exe"
|
||||
)
|
||||
@echo.
|
||||
|
||||
@echo Copying VCRedist to Prerequisites
|
||||
@echo ----------------------------------------------------------------------
|
||||
:: Make sure the "prereq" directory exists
|
||||
|
@ -386,8 +403,8 @@ If Exist "%BinDir%\Lib\site-packages\salt\modules\solaris*"^
|
|||
del /Q "%BinDir%\Lib\site-packages\salt\modules\solaris*" 1>nul
|
||||
If Exist "%BinDir%\Lib\site-packages\salt\modules\solr.py"^
|
||||
del /Q "%BinDir%\Lib\site-packages\salt\modules\solr.*" 1>nul
|
||||
If Exist "%BinDir%\Lib\site-packages\salt\modules\ssh*"^
|
||||
del /Q "%BinDir%\Lib\site-packages\salt\modules\ssh*" 1>nul
|
||||
If Exist "%BinDir%\Lib\site-packages\salt\modules\ssh_*"^
|
||||
del /Q "%BinDir%\Lib\site-packages\salt\modules\ssh_*" 1>nul
|
||||
If Exist "%BinDir%\Lib\site-packages\salt\modules\supervisord.py"^
|
||||
del /Q "%BinDir%\Lib\site-packages\salt\modules\supervisord.*" 1>nul
|
||||
If Exist "%BinDir%\Lib\site-packages\salt\modules\sysbench.py"^
|
||||
|
@ -522,8 +539,8 @@ If Exist "%BinDir%\Lib\site-packages\salt\states\smartos.py"^
|
|||
del /Q "%BinDir%\Lib\site-packages\salt\states\smartos.*" 1>nul
|
||||
If Exist "%BinDir%\Lib\site-packages\salt\states\snapper.py"^
|
||||
del /Q "%BinDir%\Lib\site-packages\salt\states\snapper.*" 1>nul
|
||||
If Exist "%BinDir%\Lib\site-packages\salt\states\ssh*"^
|
||||
del /Q "%BinDir%\Lib\site-packages\salt\states\ssh*" 1>nul
|
||||
If Exist "%BinDir%\Lib\site-packages\salt\states\ssh_*"^
|
||||
del /Q "%BinDir%\Lib\site-packages\salt\states\ssh_*" 1>nul
|
||||
If Exist "%BinDir%\Lib\site-packages\salt\states\supervisord.py"^
|
||||
del /Q "%BinDir%\Lib\site-packages\salt\states\supervisord.*" 1>nul
|
||||
If Exist "%BinDir%\Lib\site-packages\salt\states\sysrc.py"^
|
||||
|
|
Binary file not shown.
|
@ -267,7 +267,7 @@ Section -Prerequisites
|
|||
# /qb! used by 2008 installer
|
||||
# It just ignores the unrecognized switches...
|
||||
ClearErrors
|
||||
ExecWait '"$INSTDIR\vcredist.exe" /qb! /passive /norestart' $0
|
||||
ExecWait '"$INSTDIR\vcredist.exe" /qb! /quiet /norestart' $0
|
||||
IfErrors 0 CheckVcRedistErrorCode
|
||||
MessageBox MB_OK \
|
||||
"$VcRedistName failed to install. Try installing the package manually." \
|
||||
|
@ -403,7 +403,6 @@ Section -Post
|
|||
nsExec::Exec "nssm.exe install salt-minion $INSTDIR\bin\python.exe -E -s $INSTDIR\bin\Scripts\salt-minion -c $INSTDIR\conf -l quiet"
|
||||
nsExec::Exec "nssm.exe set salt-minion Description Salt Minion from saltstack.com"
|
||||
nsExec::Exec "nssm.exe set salt-minion Start SERVICE_AUTO_START"
|
||||
nsExec::Exec "nssm.exe set salt-minion AppNoConsole 1"
|
||||
nsExec::Exec "nssm.exe set salt-minion AppStopMethodConsole 24000"
|
||||
nsExec::Exec "nssm.exe set salt-minion AppStopMethodWindow 2000"
|
||||
|
||||
|
@ -588,7 +587,7 @@ FunctionEnd
|
|||
# Push "this is some string"
|
||||
# Push "some"
|
||||
# Call StrStr
|
||||
# Pop $0 ; "some string"
|
||||
# Pop $0 # "some string"
|
||||
#------------------------------------------------------------------------------
|
||||
!macro StrStr un
|
||||
Function ${un}StrStr
|
||||
|
@ -694,7 +693,7 @@ Function AddToPath
|
|||
|
||||
# Make sure the new length isn't over the NSIS_MAX_STRLEN
|
||||
IntCmp $2 ${NSIS_MAX_STRLEN} +4 +4 0
|
||||
DetailPrint "AddToPath: new length $2 > ${NSIS_MAX_STRLEN}"
|
||||
DetailPrint "AddToPath Failed: new length $2 > ${NSIS_MAX_STRLEN}"
|
||||
MessageBox MB_OK \
|
||||
"You may add C:\salt to the %PATH% for convenience when issuing local salt commands from the command line." \
|
||||
/SD IDOK
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
from __future__ import print_function
|
||||
|
||||
import sys
|
||||
import os.path
|
||||
import os
|
||||
import getopt
|
||||
|
||||
|
||||
|
@ -16,7 +16,9 @@ def display_help():
|
|||
print('# Parameters: #')
|
||||
print('# -f, --file : target file #')
|
||||
print('# -s, --search : term to search for #')
|
||||
print('# default is "C:\Python" #')
|
||||
print('# Default is the base path for the python #')
|
||||
print('# executable that is running this script. #')
|
||||
print('# In Py2 that would be C:\\Python27 #')
|
||||
print('# -r, --replace : replace with this #')
|
||||
print('# default is ".." #')
|
||||
print('# #')
|
||||
|
@ -29,16 +31,12 @@ def display_help():
|
|||
|
||||
def main(argv):
|
||||
target = ''
|
||||
python_dir = 'Python{0}{1}'.format(sys.version_info[0], sys.version_info[1])
|
||||
if sys.version_info >= (3, 5):
|
||||
from win32com.shell import shellcon, shell
|
||||
search = shell.SHGetFolderPath(0, shellcon.CSIDL_PROGRAM_FILES, 0, 0)
|
||||
search = os.path.join(search, python_dir)
|
||||
else:
|
||||
search = os.path.join('C:\\', python_dir)
|
||||
search = os.path.dirname(sys.executable)
|
||||
replace = '..'
|
||||
try:
|
||||
opts, args = getopt.getopt(argv,"hf:s:r:",["file=","search=", "replace="])
|
||||
opts, args = getopt.getopt(argv,
|
||||
"hf:s:r:",
|
||||
["file=", "search=", "replace="])
|
||||
except getopt.GetoptError:
|
||||
display_help()
|
||||
for opt, arg in opts:
|
||||
|
@ -56,10 +54,10 @@ def main(argv):
|
|||
if sys.version_info >= (3, 0):
|
||||
search = search.encode('utf-8')
|
||||
replace = replace.encode('utf-8')
|
||||
f = open( target, 'rb' ).read()
|
||||
f = f.replace( search, replace )
|
||||
f = f.replace( search.lower(), replace )
|
||||
open( target, 'wb' ).write(f)
|
||||
f = open(target, 'rb').read()
|
||||
f = f.replace(search, replace)
|
||||
f = f.replace(search.lower(), replace)
|
||||
open(target, 'wb').write(f)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
|
@ -12,21 +12,25 @@ idna==2.5
|
|||
ioloop==0.1a0
|
||||
ipaddress==1.0.18
|
||||
Jinja2==2.9.6
|
||||
libnacl==1.6.1
|
||||
lxml==3.7.3
|
||||
Mako==1.0.6
|
||||
MarkupSafe==1.0
|
||||
msgpack-python==0.4.8
|
||||
psutil==5.2.2
|
||||
pyasn1==0.2.3
|
||||
pycparser==2.17
|
||||
pycrypto==2.6.1
|
||||
pycurl==7.43.0
|
||||
PyMySQL==0.7.11
|
||||
pyOpenSSL==17.0.0
|
||||
python-dateutil==2.6.0
|
||||
python-gnupg==0.4.0
|
||||
pywin32==223
|
||||
PyYAML==3.12
|
||||
pyzmq==16.0.2
|
||||
requests==2.13.0
|
||||
singledispatch==3.4.0.3
|
||||
six==1.10.0
|
||||
smmap==0.9.0
|
||||
timelib==0.2.4
|
||||
tornado==4.5.1
|
|
@ -1,4 +0,0 @@
|
|||
-r req_base.txt
|
||||
|
||||
lxml==3.6.0
|
||||
pypiwin32==219
|
|
@ -1,5 +0,0 @@
|
|||
-r req_base.txt
|
||||
|
||||
lxml==3.7.3
|
||||
pycrypto==2.6.1
|
||||
PyYAML==3.12
|
|
@ -1,8 +1,8 @@
|
|||
Jinja2
|
||||
msgpack-python>0.3
|
||||
msgpack-python>0.3,!=0.5.5
|
||||
PyYAML
|
||||
MarkupSafe
|
||||
requests>=1.0.0
|
||||
tornado>=4.2.1
|
||||
tornado>=4.2.1,<5.0
|
||||
# Required by Tornado to handle threads stuff.
|
||||
futures>=2.0
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
-r base.txt
|
||||
|
||||
mock
|
||||
mock>=2.0.0
|
||||
apache-libcloud>=0.14.0
|
||||
boto>=2.32.1
|
||||
boto3>=1.2.1
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
-r base.txt
|
||||
|
||||
mock
|
||||
mock>=2.0.0
|
||||
apache-libcloud>=0.14.0
|
||||
boto>=2.32.1
|
||||
boto3>=1.2.1
|
||||
|
|
|
@ -48,16 +48,20 @@ from salt.ext.six.moves import range # pylint: disable=import-error,redefined-b
|
|||
# Import 3rd-party libs
|
||||
import salt.ext.six as six
|
||||
|
||||
LIBPAM = CDLL(find_library('pam'))
|
||||
LIBC = CDLL(find_library('c'))
|
||||
try:
|
||||
LIBC = CDLL(find_library('c'))
|
||||
|
||||
CALLOC = LIBC.calloc
|
||||
CALLOC.restype = c_void_p
|
||||
CALLOC.argtypes = [c_uint, c_uint]
|
||||
CALLOC = LIBC.calloc
|
||||
CALLOC.restype = c_void_p
|
||||
CALLOC.argtypes = [c_uint, c_uint]
|
||||
|
||||
STRDUP = LIBC.strdup
|
||||
STRDUP.argstypes = [c_char_p]
|
||||
STRDUP.restype = POINTER(c_char) # NOT c_char_p !!!!
|
||||
STRDUP = LIBC.strdup
|
||||
STRDUP.argstypes = [c_char_p]
|
||||
STRDUP.restype = POINTER(c_char) # NOT c_char_p !!!!
|
||||
except AttributeError:
|
||||
HAS_LIBC = False
|
||||
else:
|
||||
HAS_LIBC = True
|
||||
|
||||
# Various constants
|
||||
PAM_PROMPT_ECHO_OFF = 1
|
||||
|
@ -121,6 +125,7 @@ class PamConv(Structure):
|
|||
|
||||
|
||||
try:
|
||||
LIBPAM = CDLL(find_library('pam'))
|
||||
PAM_START = LIBPAM.pam_start
|
||||
PAM_START.restype = c_int
|
||||
PAM_START.argtypes = [c_char_p, c_char_p, POINTER(PamConv),
|
||||
|
@ -147,7 +152,7 @@ def __virtual__():
|
|||
'''
|
||||
Only load on Linux systems
|
||||
'''
|
||||
return HAS_PAM
|
||||
return HAS_LIBC and HAS_PAM
|
||||
|
||||
|
||||
def authenticate(username, password):
|
||||
|
|
|
@ -37,8 +37,8 @@ import logging
|
|||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def auth(username, sharedsecret, **kwargs):
|
||||
def auth(username, password):
|
||||
'''
|
||||
Shared secret authentication
|
||||
'''
|
||||
return sharedsecret == __opts__.get('sharedsecret')
|
||||
return password == __opts__.get('sharedsecret')
|
||||
|
|
|
@ -79,7 +79,7 @@ def beacon(config):
|
|||
The second one will match disks from A:\ to Z:\ on a Windows system
|
||||
|
||||
Note that if a regular expression are evaluated after static mount points,
|
||||
which means that if a regular expression matches an other defined mount point,
|
||||
which means that if a regular expression matches another defined mount point,
|
||||
it will override the previously defined threshold.
|
||||
|
||||
'''
|
||||
|
|
|
@ -113,7 +113,7 @@ def beacon(config):
|
|||
for k in ['1m', '5m', '15m']:
|
||||
LAST_STATUS[k] = avg_dict[k]
|
||||
if not config['emitatstartup']:
|
||||
log.debug('Dont emit because emitatstartup is False')
|
||||
log.debug("Don't emit because emitatstartup is False")
|
||||
return ret
|
||||
|
||||
send_beacon = False
|
||||
|
|
14
salt/cache/localfs.py
vendored
14
salt/cache/localfs.py
vendored
|
@ -14,6 +14,7 @@ from __future__ import absolute_import
|
|||
import logging
|
||||
import os
|
||||
import os.path
|
||||
import errno
|
||||
import shutil
|
||||
import tempfile
|
||||
|
||||
|
@ -45,13 +46,14 @@ def store(bank, key, data, cachedir):
|
|||
Store information in a file.
|
||||
'''
|
||||
base = os.path.join(cachedir, os.path.normpath(bank))
|
||||
if not os.path.isdir(base):
|
||||
try:
|
||||
os.makedirs(base)
|
||||
except OSError as exc:
|
||||
try:
|
||||
os.makedirs(base)
|
||||
except OSError as exc:
|
||||
if exc.errno != errno.EEXIST:
|
||||
raise SaltCacheError(
|
||||
'The cache directory, {0}, does not exist and could not be '
|
||||
'created: {1}'.format(base, exc)
|
||||
'The cache directory, {0}, could not be created: {1}'.format(
|
||||
base, exc
|
||||
)
|
||||
)
|
||||
|
||||
outfile = os.path.join(base, '{0}.p'.format(key))
|
||||
|
|
2
salt/cache/redis_cache.py
vendored
2
salt/cache/redis_cache.py
vendored
|
@ -333,7 +333,7 @@ def flush(bank, key=None):
|
|||
An improvement for this would be loading a custom Lua script in the Redis instance of the user
|
||||
(using the ``register_script`` feature) and call it whenever we flush.
|
||||
This script would only need to build this sub-tree causing problems. It can be added later and the behaviour
|
||||
should not change as the user needs to explicitely allow Salt inject scripts in their Redis instance.
|
||||
should not change as the user needs to explicitly allow Salt inject scripts in their Redis instance.
|
||||
'''
|
||||
redis_server = _get_redis_server()
|
||||
redis_pipe = redis_server.pipeline()
|
||||
|
|
|
@ -9,11 +9,11 @@
|
|||
|
||||
# Import Python libs
|
||||
from __future__ import absolute_import, print_function
|
||||
import os
|
||||
import logging
|
||||
|
||||
# Import Salt libs
|
||||
import salt.client.netapi
|
||||
import salt.utils.files
|
||||
import salt.utils.parsers as parsers
|
||||
from salt.utils.verify import check_user, verify_files, verify_log
|
||||
|
||||
|
@ -42,9 +42,8 @@ class SaltAPI(parsers.SaltAPIParser):
|
|||
'udp://',
|
||||
'file://')):
|
||||
# Logfile is not using Syslog, verify
|
||||
current_umask = os.umask(0o027)
|
||||
verify_files([logfile], self.config['user'])
|
||||
os.umask(current_umask)
|
||||
with salt.utils.files.set_umask(0o027):
|
||||
verify_files([logfile], self.config['user'])
|
||||
except OSError as err:
|
||||
log.exception('Failed to prepare salt environment')
|
||||
self.shutdown(err.errno)
|
||||
|
|
|
@ -406,7 +406,7 @@ class SaltCMD(parsers.SaltCMDOptionParser):
|
|||
for host in ret:
|
||||
if isinstance(ret[host], string_types) \
|
||||
and (ret[host].startswith("Minion did not return")
|
||||
or ret[host] == 'VALUE TRIMMED'):
|
||||
or ret[host] == 'VALUE_TRIMMED'):
|
||||
continue
|
||||
for fun in ret[host]:
|
||||
if fun not in docs and ret[host][fun]:
|
||||
|
|
|
@ -30,7 +30,7 @@ class SPM(parsers.SPMParser):
|
|||
self.parse_args()
|
||||
self.setup_logfile_logger()
|
||||
v_dirs = [
|
||||
self.config['cachedir'],
|
||||
self.config['spm_cache_dir'],
|
||||
]
|
||||
verify_env(v_dirs,
|
||||
self.config['user'],
|
||||
|
|
|
@ -246,7 +246,7 @@ class LocalClient(object):
|
|||
|
||||
return pub_data
|
||||
|
||||
def _check_pub_data(self, pub_data):
|
||||
def _check_pub_data(self, pub_data, listen=True):
|
||||
'''
|
||||
Common checks on the pub_data data structure returned from running pub
|
||||
'''
|
||||
|
@ -279,7 +279,13 @@ class LocalClient(object):
|
|||
print('No minions matched the target. '
|
||||
'No command was sent, no jid was assigned.')
|
||||
return {}
|
||||
else:
|
||||
|
||||
# don't install event subscription listeners when the request is async
|
||||
# and doesn't care. this is important as it will create event leaks otherwise
|
||||
if not listen:
|
||||
return pub_data
|
||||
|
||||
if self.opts.get('order_masters'):
|
||||
self.event.subscribe('syndic/.*/{0}'.format(pub_data['jid']), 'regex')
|
||||
|
||||
self.event.subscribe('salt/job/{0}'.format(pub_data['jid']))
|
||||
|
@ -343,7 +349,7 @@ class LocalClient(object):
|
|||
# Convert to generic client error and pass along message
|
||||
raise SaltClientError(general_exception)
|
||||
|
||||
return self._check_pub_data(pub_data)
|
||||
return self._check_pub_data(pub_data, listen=listen)
|
||||
|
||||
def gather_minions(self, tgt, expr_form):
|
||||
return salt.utils.minions.CkMinions(self.opts).check_minions(tgt, tgt_type=expr_form)
|
||||
|
@ -408,7 +414,7 @@ class LocalClient(object):
|
|||
# Convert to generic client error and pass along message
|
||||
raise SaltClientError(general_exception)
|
||||
|
||||
raise tornado.gen.Return(self._check_pub_data(pub_data))
|
||||
raise tornado.gen.Return(self._check_pub_data(pub_data, listen=listen))
|
||||
|
||||
def cmd_async(
|
||||
self,
|
||||
|
@ -449,6 +455,7 @@ class LocalClient(object):
|
|||
tgt_type,
|
||||
ret,
|
||||
jid=jid,
|
||||
listen=False,
|
||||
**kwargs)
|
||||
try:
|
||||
return pub_data['jid']
|
||||
|
|
|
@ -53,7 +53,7 @@ import salt.ext.six as six
|
|||
from salt.ext.six.moves import input # pylint: disable=import-error,redefined-builtin
|
||||
try:
|
||||
import saltwinshell
|
||||
HAS_WINSHELL = False
|
||||
HAS_WINSHELL = True
|
||||
except ImportError:
|
||||
HAS_WINSHELL = False
|
||||
try:
|
||||
|
@ -157,17 +157,17 @@ do
|
|||
py_cmd_path=`"$py_cmd" -c \
|
||||
'from __future__ import print_function;
|
||||
import sys; print(sys.executable);'`
|
||||
cmdpath=$(command -v $py_cmd 2>/dev/null || which $py_cmd 2>/dev/null)
|
||||
cmdpath=`command -v $py_cmd 2>/dev/null || which $py_cmd 2>/dev/null`
|
||||
if file $cmdpath | grep "shell script" > /dev/null
|
||||
then
|
||||
ex_vars="'PATH', 'LD_LIBRARY_PATH', 'MANPATH', \
|
||||
'XDG_DATA_DIRS', 'PKG_CONFIG_PATH'"
|
||||
export $($py_cmd -c \
|
||||
export `$py_cmd -c \
|
||||
"from __future__ import print_function;
|
||||
import sys;
|
||||
import os;
|
||||
map(sys.stdout.write, ['{{{{0}}}}={{{{1}}}} ' \
|
||||
.format(x, os.environ[x]) for x in [$ex_vars]])")
|
||||
.format(x, os.environ[x]) for x in [$ex_vars]])"`
|
||||
exec $SUDO PATH=$PATH LD_LIBRARY_PATH=$LD_LIBRARY_PATH \
|
||||
MANPATH=$MANPATH XDG_DATA_DIRS=$XDG_DATA_DIRS \
|
||||
PKG_CONFIG_PATH=$PKG_CONFIG_PATH \
|
||||
|
@ -220,7 +220,8 @@ class SSH(object):
|
|||
if self.opts['regen_thin']:
|
||||
self.opts['ssh_wipe'] = True
|
||||
if not salt.utils.which('ssh'):
|
||||
raise salt.exceptions.SaltSystemExit('No ssh binary found in path -- ssh must be installed for salt-ssh to run. Exiting.')
|
||||
raise salt.exceptions.SaltSystemExit(code=-1,
|
||||
msg='No ssh binary found in path -- ssh must be installed for salt-ssh to run. Exiting.')
|
||||
self.opts['_ssh_version'] = ssh_version()
|
||||
self.tgt_type = self.opts['selected_target_option'] \
|
||||
if self.opts['selected_target_option'] else 'glob'
|
||||
|
@ -469,6 +470,19 @@ class SSH(object):
|
|||
self.targets[host][default] = self.defaults[default]
|
||||
if 'host' not in self.targets[host]:
|
||||
self.targets[host]['host'] = host
|
||||
if self.targets[host].get('winrm') and not HAS_WINSHELL:
|
||||
returned.add(host)
|
||||
rets.add(host)
|
||||
log_msg = 'Please contact sales@saltstack.com for access to the enterprise saltwinshell module.'
|
||||
log.debug(log_msg)
|
||||
no_ret = {'fun_args': [],
|
||||
'jid': None,
|
||||
'return': log_msg,
|
||||
'retcode': 1,
|
||||
'fun': '',
|
||||
'id': host}
|
||||
yield {host: no_ret}
|
||||
continue
|
||||
args = (
|
||||
que,
|
||||
self.opts,
|
||||
|
@ -914,6 +928,7 @@ class Single(object):
|
|||
opts_pkg['pillar_roots'] = self.opts['pillar_roots']
|
||||
opts_pkg['ext_pillar'] = self.opts['ext_pillar']
|
||||
opts_pkg['extension_modules'] = self.opts['extension_modules']
|
||||
opts_pkg['module_dirs'] = self.opts['module_dirs']
|
||||
opts_pkg['_ssh_version'] = self.opts['_ssh_version']
|
||||
opts_pkg['__master_opts__'] = self.context['master_opts']
|
||||
if '_caller_cachedir' in self.opts:
|
||||
|
|
|
@ -101,13 +101,15 @@ def is_windows():
|
|||
def need_deployment():
|
||||
"""
|
||||
Salt thin needs to be deployed - prep the target directory and emit the
|
||||
delimeter and exit code that signals a required deployment.
|
||||
delimiter and exit code that signals a required deployment.
|
||||
"""
|
||||
if os.path.exists(OPTIONS.saltdir):
|
||||
shutil.rmtree(OPTIONS.saltdir)
|
||||
old_umask = os.umask(0o077)
|
||||
os.makedirs(OPTIONS.saltdir)
|
||||
os.umask(old_umask)
|
||||
old_umask = os.umask(0o077) # pylint: disable=blacklisted-function
|
||||
try:
|
||||
os.makedirs(OPTIONS.saltdir)
|
||||
finally:
|
||||
os.umask(old_umask) # pylint: disable=blacklisted-function
|
||||
# Verify perms on saltdir
|
||||
if not is_windows():
|
||||
euid = os.geteuid()
|
||||
|
@ -153,11 +155,14 @@ def get_hash(path, form='sha1', chunk_size=4096):
|
|||
def unpack_thin(thin_path):
|
||||
"""Unpack the Salt thin archive."""
|
||||
tfile = tarfile.TarFile.gzopen(thin_path)
|
||||
old_umask = os.umask(0o077)
|
||||
old_umask = os.umask(0o077) # pylint: disable=blacklisted-function
|
||||
tfile.extractall(path=OPTIONS.saltdir)
|
||||
tfile.close()
|
||||
os.umask(old_umask)
|
||||
os.unlink(thin_path)
|
||||
os.umask(old_umask) # pylint: disable=blacklisted-function
|
||||
try:
|
||||
os.unlink(thin_path)
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
|
||||
def need_ext():
|
||||
|
@ -177,10 +182,10 @@ def unpack_ext(ext_path):
|
|||
'minion',
|
||||
'extmods')
|
||||
tfile = tarfile.TarFile.gzopen(ext_path)
|
||||
old_umask = os.umask(0o077)
|
||||
old_umask = os.umask(0o077) # pylint: disable=blacklisted-function
|
||||
tfile.extractall(path=modcache)
|
||||
tfile.close()
|
||||
os.umask(old_umask)
|
||||
os.umask(old_umask) # pylint: disable=blacklisted-function
|
||||
os.unlink(ext_path)
|
||||
ver_path = os.path.join(modcache, 'ext_version')
|
||||
ver_dst = os.path.join(OPTIONS.saltdir, 'ext_version')
|
||||
|
@ -285,7 +290,7 @@ def main(argv): # pylint: disable=W0613
|
|||
sys.stderr.write(OPTIONS.delimiter + '\n')
|
||||
sys.stderr.flush()
|
||||
if OPTIONS.cmd_umask is not None:
|
||||
old_umask = os.umask(OPTIONS.cmd_umask)
|
||||
old_umask = os.umask(OPTIONS.cmd_umask) # pylint: disable=blacklisted-function
|
||||
if OPTIONS.tty:
|
||||
# Returns bytes instead of string on python 3
|
||||
stdout, _ = subprocess.Popen(salt_argv, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()
|
||||
|
@ -299,7 +304,7 @@ def main(argv): # pylint: disable=W0613
|
|||
else:
|
||||
subprocess.call(salt_argv)
|
||||
if OPTIONS.cmd_umask is not None:
|
||||
os.umask(old_umask)
|
||||
os.umask(old_umask) # pylint: disable=blacklisted-function
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main(sys.argv))
|
||||
|
|
|
@ -72,6 +72,12 @@ class SSHHighState(salt.state.BaseHighState):
|
|||
self.matcher = salt.minion.Matcher(self.opts)
|
||||
self.tops = salt.loader.tops(self.opts)
|
||||
|
||||
self._pydsl_all_decls = {}
|
||||
self._pydsl_render_stack = []
|
||||
|
||||
def push_active(self):
|
||||
salt.state.HighState.stack.append(self)
|
||||
|
||||
def load_dynamic(self, matches):
|
||||
'''
|
||||
Stub out load_dynamic
|
||||
|
@ -199,7 +205,7 @@ def prep_trans_tar(opts, file_client, chunks, file_refs, pillar=None, id_=None):
|
|||
os.makedirs(env_root)
|
||||
for ref in file_refs[saltenv]:
|
||||
for name in ref:
|
||||
short = salt.utils.url.parse(name)[0]
|
||||
short = salt.utils.url.parse(name)[0].lstrip('/')
|
||||
cache_dest = os.path.join(cache_dest_root, short)
|
||||
try:
|
||||
path = file_client.cache_file(name, saltenv, cachedir=cachedir)
|
||||
|
|
|
@ -15,6 +15,7 @@ import logging
|
|||
import salt.client.ssh.shell
|
||||
import salt.client.ssh.state
|
||||
import salt.utils
|
||||
import salt.utils.files
|
||||
import salt.utils.thin
|
||||
import salt.roster
|
||||
import salt.state
|
||||
|
@ -87,6 +88,28 @@ def _merge_extra_filerefs(*args):
|
|||
return ','.join(ret)
|
||||
|
||||
|
||||
def _cleanup_slsmod_low_data(low_data):
|
||||
'''
|
||||
Set "slsmod" keys to None to make
|
||||
low_data JSON serializable
|
||||
'''
|
||||
for i in low_data:
|
||||
if 'slsmod' in i:
|
||||
i['slsmod'] = None
|
||||
|
||||
|
||||
def _cleanup_slsmod_high_data(high_data):
|
||||
'''
|
||||
Set "slsmod" keys to None to make
|
||||
high_data JSON serializable
|
||||
'''
|
||||
for i in six.itervalues(high_data):
|
||||
if 'stateconf' in i:
|
||||
stateconf_data = i['stateconf'][1]
|
||||
if 'slsmod' in stateconf_data:
|
||||
stateconf_data['slsmod'] = None
|
||||
|
||||
|
||||
def sls(mods, saltenv='base', test=None, exclude=None, **kwargs):
|
||||
'''
|
||||
Create the seed file for a state.sls run
|
||||
|
@ -99,6 +122,7 @@ def sls(mods, saltenv='base', test=None, exclude=None, **kwargs):
|
|||
__pillar__,
|
||||
__salt__,
|
||||
__context__['fileclient'])
|
||||
st_.push_active()
|
||||
if isinstance(mods, str):
|
||||
mods = mods.split(',')
|
||||
high_data, errors = st_.render_highstate({saltenv: mods})
|
||||
|
@ -130,6 +154,7 @@ def sls(mods, saltenv='base', test=None, exclude=None, **kwargs):
|
|||
)
|
||||
)
|
||||
# Create the tar containing the state pkg and relevant files.
|
||||
_cleanup_slsmod_low_data(chunks)
|
||||
trans_tar = salt.client.ssh.state.prep_trans_tar(
|
||||
__opts__,
|
||||
__context__['fileclient'],
|
||||
|
@ -371,6 +396,7 @@ def high(data, **kwargs):
|
|||
__pillar__,
|
||||
__salt__,
|
||||
__context__['fileclient'])
|
||||
st_.push_active()
|
||||
chunks = st_.state.compile_high_data(data)
|
||||
file_refs = salt.client.ssh.state.lowstate_file_refs(
|
||||
chunks,
|
||||
|
@ -380,6 +406,7 @@ def high(data, **kwargs):
|
|||
)
|
||||
)
|
||||
# Create the tar containing the state pkg and relevant files.
|
||||
_cleanup_slsmod_low_data(chunks)
|
||||
trans_tar = salt.client.ssh.state.prep_trans_tar(
|
||||
__opts__,
|
||||
__context__['fileclient'],
|
||||
|
@ -470,17 +497,16 @@ def request(mods=None,
|
|||
'kwargs': kwargs
|
||||
}
|
||||
})
|
||||
cumask = os.umask(0o77)
|
||||
try:
|
||||
if salt.utils.is_windows():
|
||||
# Make sure cache file isn't read-only
|
||||
__salt__['cmd.run']('attrib -R "{0}"'.format(notify_path))
|
||||
with salt.utils.fopen(notify_path, 'w+b') as fp_:
|
||||
serial.dump(req, fp_)
|
||||
except (IOError, OSError):
|
||||
msg = 'Unable to write state request file {0}. Check permission.'
|
||||
log.error(msg.format(notify_path))
|
||||
os.umask(cumask)
|
||||
with salt.utils.files.set_umask(0o077):
|
||||
try:
|
||||
if salt.utils.is_windows():
|
||||
# Make sure cache file isn't read-only
|
||||
__salt__['cmd.run']('attrib -R "{0}"'.format(notify_path))
|
||||
with salt.utils.fopen(notify_path, 'w+b') as fp_:
|
||||
serial.dump(req, fp_)
|
||||
except (IOError, OSError):
|
||||
msg = 'Unable to write state request file {0}. Check permission.'
|
||||
log.error(msg.format(notify_path))
|
||||
return ret
|
||||
|
||||
|
||||
|
@ -534,17 +560,16 @@ def clear_request(name=None):
|
|||
req.pop(name)
|
||||
else:
|
||||
return False
|
||||
cumask = os.umask(0o77)
|
||||
try:
|
||||
if salt.utils.is_windows():
|
||||
# Make sure cache file isn't read-only
|
||||
__salt__['cmd.run']('attrib -R "{0}"'.format(notify_path))
|
||||
with salt.utils.fopen(notify_path, 'w+b') as fp_:
|
||||
serial.dump(req, fp_)
|
||||
except (IOError, OSError):
|
||||
msg = 'Unable to write state request file {0}. Check permission.'
|
||||
log.error(msg.format(notify_path))
|
||||
os.umask(cumask)
|
||||
with salt.utils.files.set_umask(0o077):
|
||||
try:
|
||||
if salt.utils.is_windows():
|
||||
# Make sure cache file isn't read-only
|
||||
__salt__['cmd.run']('attrib -R "{0}"'.format(notify_path))
|
||||
with salt.utils.fopen(notify_path, 'w+b') as fp_:
|
||||
serial.dump(req, fp_)
|
||||
except (IOError, OSError):
|
||||
msg = 'Unable to write state request file {0}. Check permission.'
|
||||
log.error(msg.format(notify_path))
|
||||
return True
|
||||
|
||||
|
||||
|
@ -600,6 +625,7 @@ def highstate(test=None, **kwargs):
|
|||
__pillar__,
|
||||
__salt__,
|
||||
__context__['fileclient'])
|
||||
st_.push_active()
|
||||
chunks = st_.compile_low_chunks()
|
||||
file_refs = salt.client.ssh.state.lowstate_file_refs(
|
||||
chunks,
|
||||
|
@ -614,6 +640,7 @@ def highstate(test=None, **kwargs):
|
|||
__context__['retcode'] = 1
|
||||
return chunks
|
||||
# Create the tar containing the state pkg and relevant files.
|
||||
_cleanup_slsmod_low_data(chunks)
|
||||
trans_tar = salt.client.ssh.state.prep_trans_tar(
|
||||
__opts__,
|
||||
__context__['fileclient'],
|
||||
|
@ -680,6 +707,7 @@ def top(topfn, test=None, **kwargs):
|
|||
__salt__,
|
||||
__context__['fileclient'])
|
||||
st_.opts['state_top'] = os.path.join('salt://', topfn)
|
||||
st_.push_active()
|
||||
chunks = st_.compile_low_chunks()
|
||||
file_refs = salt.client.ssh.state.lowstate_file_refs(
|
||||
chunks,
|
||||
|
@ -689,6 +717,7 @@ def top(topfn, test=None, **kwargs):
|
|||
)
|
||||
)
|
||||
# Create the tar containing the state pkg and relevant files.
|
||||
_cleanup_slsmod_low_data(chunks)
|
||||
trans_tar = salt.client.ssh.state.prep_trans_tar(
|
||||
__opts__,
|
||||
__context__['fileclient'],
|
||||
|
@ -746,7 +775,10 @@ def show_highstate():
|
|||
__pillar__,
|
||||
__salt__,
|
||||
__context__['fileclient'])
|
||||
return st_.compile_highstate()
|
||||
st_.push_active()
|
||||
chunks = st_.compile_highstate()
|
||||
_cleanup_slsmod_high_data(chunks)
|
||||
return chunks
|
||||
|
||||
|
||||
def show_lowstate():
|
||||
|
@ -765,7 +797,10 @@ def show_lowstate():
|
|||
__pillar__,
|
||||
__salt__,
|
||||
__context__['fileclient'])
|
||||
return st_.compile_low_chunks()
|
||||
st_.push_active()
|
||||
chunks = st_.compile_low_chunks()
|
||||
_cleanup_slsmod_low_data(chunks)
|
||||
return chunks
|
||||
|
||||
|
||||
def sls_id(id_, mods, test=None, queue=False, **kwargs):
|
||||
|
@ -884,6 +919,7 @@ def show_sls(mods, saltenv='base', test=None, **kwargs):
|
|||
__pillar__,
|
||||
__salt__,
|
||||
__context__['fileclient'])
|
||||
st_.push_active()
|
||||
if isinstance(mods, string_types):
|
||||
mods = mods.split(',')
|
||||
high_data, errors = st_.render_highstate({saltenv: mods})
|
||||
|
@ -898,6 +934,7 @@ def show_sls(mods, saltenv='base', test=None, **kwargs):
|
|||
# Verify that the high data is structurally sound
|
||||
if errors:
|
||||
return errors
|
||||
_cleanup_slsmod_high_data(high_data)
|
||||
return high_data
|
||||
|
||||
|
||||
|
@ -927,6 +964,7 @@ def show_low_sls(mods, saltenv='base', test=None, **kwargs):
|
|||
__pillar__,
|
||||
__salt__,
|
||||
__context__['fileclient'])
|
||||
st_.push_active()
|
||||
if isinstance(mods, string_types):
|
||||
mods = mods.split(',')
|
||||
high_data, errors = st_.render_highstate({saltenv: mods})
|
||||
|
@ -942,6 +980,7 @@ def show_low_sls(mods, saltenv='base', test=None, **kwargs):
|
|||
if errors:
|
||||
return errors
|
||||
ret = st_.state.compile_high_data(high_data)
|
||||
_cleanup_slsmod_low_data(ret)
|
||||
return ret
|
||||
|
||||
|
||||
|
|
|
@ -234,7 +234,7 @@ class CloudClient(object):
|
|||
if a.get('provider', '')]
|
||||
if providers:
|
||||
_providers = opts.get('providers', {})
|
||||
for provider in list(_providers).copy():
|
||||
for provider in _providers.copy():
|
||||
if provider not in providers:
|
||||
_providers.pop(provider)
|
||||
return opts
|
||||
|
@ -1493,8 +1493,8 @@ class Cloud(object):
|
|||
vm_name = vm_details['id']
|
||||
else:
|
||||
log.debug(
|
||||
'vm:{0} in provider:{1} is not in name '
|
||||
'list:\'{2}\''.format(vm_name, driver, names)
|
||||
'vm:%s in provider:%s is not in name '
|
||||
'list:\'%s\'', vm_name, driver, names
|
||||
)
|
||||
continue
|
||||
|
||||
|
|
|
@ -159,7 +159,7 @@ def avail_sizes(call=None):
|
|||
'-f or --function, or with the --list-sizes option'
|
||||
)
|
||||
|
||||
items = query(method='sizes')
|
||||
items = query(method='sizes', command='?per_page=100')
|
||||
ret = {}
|
||||
for size in items['sizes']:
|
||||
ret[size['slug']] = {}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue