mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 13:20:23 -07:00
Add ability to specify syslog facility for modules
Update constants.py so that one can specify environmental variable ANSIBLE_SYSLOG_FACILITY or syslog_facility in ansible.cfg to define the syslog facility to use. Alternatively, you can specify ansible_syslog_facility in inventory. Runner now replaces the syslog facility in the openlog() call with the default or the injected variables ansible_syslog_facility. This also updates hacking/test-module to behave similarly.
This commit is contained in:
parent
40e49b6a5a
commit
06e54c0b97
4 changed files with 9 additions and 1 deletions
|
@ -88,6 +88,7 @@ DEFAULT_REMOTE_PORT = int(get_config(p, DEFAULTS, 'remote_port', 'ANS
|
|||
DEFAULT_TRANSPORT = get_config(p, DEFAULTS, 'transport', 'ANSIBLE_TRANSPORT', 'paramiko')
|
||||
DEFAULT_SCP_IF_SSH = get_config(p, DEFAULTS, 'scp_if_ssh', 'ANSIBLE_SCP_IF_SSH', False)
|
||||
DEFAULT_MANAGED_STR = get_config(p, DEFAULTS, 'ansible_managed', None, 'Ansible managed: {file} modified on %Y-%m-%d %H:%M:%S by {uid} on {host}')
|
||||
DEFAULT_SYSLOG_FACILITY = get_config(p, DEFAULTS, 'syslog_facility', 'ANSIBLE_SYSLOG_FACILITY', 'LOG_USER')
|
||||
|
||||
DEFAULT_ACTION_PLUGIN_PATH = shell_expand_path(get_config(p, DEFAULTS, 'action_plugins', None, '/usr/share/ansible_plugins/action_plugins'))
|
||||
DEFAULT_CALLBACK_PLUGIN_PATH = shell_expand_path(get_config(p, DEFAULTS, 'callback_plugins', None, '/usr/share/ansible_plugins/callback_plugins'))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue