mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Add ssh_log_file
option to master config and documentation
This commit is contained in:
parent
c8a0915460
commit
83d6a44254
4 changed files with 24 additions and 2 deletions
|
@ -369,6 +369,9 @@
|
|||
# Pass in an alternative location for the salt-ssh roster file
|
||||
#roster_file: /etc/salt/roster
|
||||
|
||||
# The log file of the salt-ssh command:
|
||||
#ssh_log_file: /var/log/salt/ssh
|
||||
|
||||
# Pass in minion option overrides that will be inserted into the SHIM for
|
||||
# salt-ssh calls. The local minion config is not used for salt-ssh. Can be
|
||||
# overridden on a per-minion basis in the roster (`minion_opts`)
|
||||
|
|
|
@ -706,6 +706,21 @@ Pass in an alternative location for the salt-ssh roster file.
|
|||
|
||||
roster_file: /root/roster
|
||||
|
||||
.. conf_master:: ssh_log_file
|
||||
|
||||
``ssh_log_file``
|
||||
-------------------
|
||||
|
||||
.. versionadded:: 2016.3.5
|
||||
|
||||
Default: ``/var/log/salt/ssh``
|
||||
|
||||
Specify the log file of the ``salt-ssh`` command.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
ssh_log_file: /var/log/salt/ssh
|
||||
|
||||
.. conf_master:: ssh_minion_opts
|
||||
|
||||
``ssh_minion_opts``
|
||||
|
|
|
@ -771,6 +771,7 @@ VALID_OPTS = {
|
|||
# The length that the syndic event queue must hit before events are popped off and forwarded
|
||||
'syndic_jid_forward_cache_hwm': int,
|
||||
|
||||
# Salt SSH configuration
|
||||
'ssh_passwd': str,
|
||||
'ssh_port': str,
|
||||
'ssh_sudo': bool,
|
||||
|
@ -780,6 +781,7 @@ VALID_OPTS = {
|
|||
'ssh_scan_ports': str,
|
||||
'ssh_scan_timeout': float,
|
||||
'ssh_identities_only': bool,
|
||||
'ssh_log_file': str,
|
||||
|
||||
# Enable ioflo verbose logging. Warning! Very verbose!
|
||||
'ioflo_verbose': int,
|
||||
|
@ -1311,6 +1313,7 @@ DEFAULT_MASTER_OPTS = {
|
|||
'ssh_scan_ports': '22',
|
||||
'ssh_scan_timeout': 0.01,
|
||||
'ssh_identities_only': False,
|
||||
'ssh_log_file': os.path.join(salt.syspaths.LOGS_DIR, 'ssh'),
|
||||
'master_floscript': os.path.join(FLO_DIR, 'master.flo'),
|
||||
'worker_floscript': os.path.join(FLO_DIR, 'worker.flo'),
|
||||
'maintenance_floscript': os.path.join(FLO_DIR, 'maint.flo'),
|
||||
|
|
|
@ -2600,14 +2600,15 @@ class SaltSSHOptionParser(six.with_metaclass(OptionParserMeta,
|
|||
SaltfileMixIn,
|
||||
HardCrashMixin)):
|
||||
|
||||
usage = '%prog [options]'
|
||||
usage = '%prog [options] \'<target>\' <function> [arguments]'
|
||||
|
||||
# ConfigDirMixIn config filename attribute
|
||||
_config_filename_ = 'master'
|
||||
|
||||
# LogLevelMixIn attributes
|
||||
_logfile_config_setting_name_ = 'ssh_log_file'
|
||||
_default_logging_level_ = config.DEFAULT_MASTER_OPTS['log_level']
|
||||
_default_logging_logfile_ = os.path.join(syspaths.LOGS_DIR, 'ssh')
|
||||
_default_logging_logfile_ = config.DEFAULT_MASTER_OPTS[_logfile_config_setting_name_]
|
||||
|
||||
def _mixin_setup(self):
|
||||
self.add_option(
|
||||
|
|
Loading…
Add table
Reference in a new issue