Add variable for DEFAULT_NO_TARGET_SYSLOG (#68971)
* Add variable for DEFAULT_NO_TARGET_SYSLOG * Added version_added to new var
This commit is contained in:
parent
702949e64c
commit
de6b047fc3
3 changed files with 10 additions and 2 deletions
2
changelogs/fragments/no_target_syslog-var.yaml
Normal file
2
changelogs/fragments/no_target_syslog-var.yaml
Normal file
|
@ -0,0 +1,2 @@
|
|||
minor_changes:
|
||||
- Added the ability to set ``DEFAULT_NO_TARGET_SYSLOG`` through the ``ansible_no_target_syslog`` variable on a task
|
|
@ -897,10 +897,15 @@ DEFAULT_NO_LOG:
|
|||
DEFAULT_NO_TARGET_SYSLOG:
|
||||
name: No syslog on target
|
||||
default: False
|
||||
description: Toggle Ansible logging to syslog on the target when it executes tasks.
|
||||
description:
|
||||
- Toggle Ansible logging to syslog on the target when it executes tasks. On Windows hosts this will disable a newer
|
||||
style PowerShell modules from writting to the event log.
|
||||
env: [{name: ANSIBLE_NO_TARGET_SYSLOG}]
|
||||
ini:
|
||||
- {key: no_target_syslog, section: defaults}
|
||||
vars:
|
||||
- name: ansible_no_target_syslog
|
||||
version_added: '2.10'
|
||||
type: boolean
|
||||
yaml: {key: defaults.no_target_syslog}
|
||||
DEFAULT_NULL_REPRESENTATION:
|
||||
|
|
|
@ -714,7 +714,8 @@ class ActionBase(with_metaclass(ABCMeta, object)):
|
|||
module_args['_ansible_check_mode'] = False
|
||||
|
||||
# set no log in the module arguments, if required
|
||||
module_args['_ansible_no_log'] = self._play_context.no_log or C.DEFAULT_NO_TARGET_SYSLOG
|
||||
no_target_syslog = C.config.get_config_value('DEFAULT_NO_TARGET_SYSLOG', variables=task_vars)
|
||||
module_args['_ansible_no_log'] = self._play_context.no_log or no_target_syslog
|
||||
|
||||
# set debug in the module arguments, if required
|
||||
module_args['_ansible_debug'] = C.DEFAULT_DEBUG
|
||||
|
|
Loading…
Reference in a new issue