2
0
Fork 0

Manage logfacility with fusioninventory__agent_conf_log_facility var

This commit is contained in:
Jeremy Gardais 2021-08-27 13:42:43 +02:00
parent 4ec60b99b3
commit 74fbd8e653
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
4 changed files with 21 additions and 1 deletions

View File

@ -6,6 +6,7 @@
* **no-task** with fusioninventory__agent_conf_no_task variable * **no-task** with fusioninventory__agent_conf_no_task variable
* **tasks** with fusioninventory__agent_conf_tasks variable * **tasks** with fusioninventory__agent_conf_tasks variable
* **logger** with fusioninventory__agent_conf_log_logger variable * **logger** with fusioninventory__agent_conf_log_logger variable
* **logfacility** with fusioninventory__agent_conf_log_facility variable
## v1.3.1 ## v1.3.1

View File

@ -43,6 +43,7 @@ Some variables used to generate FusionInventery agent.cfg file from Ansible temp
* **fusioninventory__agent_conf_httpd_port**: TCP port used by the webserver server to listen [default⎵: `62354`]. * **fusioninventory__agent_conf_httpd_port**: TCP port used by the webserver server to listen [default⎵: `62354`].
* **fusioninventory__agent_conf_httpd_trust**: hostname or IP or subnet authorized for http request [default⎵: ``]. * **fusioninventory__agent_conf_httpd_trust**: hostname or IP or subnet authorized for http request [default⎵: ``].
* **fusioninventory__agent_conf_log_logger**: Specifies the logger backend to use [default⎵: `syslog`]. * **fusioninventory__agent_conf_log_logger**: Specifies the logger backend to use [default⎵: `syslog`].
* **fusioninventory__agent_conf_log_facility**: Specifies the syslog facility to use for the syslog logger backend [default⎵: `LOG_DAEMON`].
* **fusioninventory__agent_conf_tag**: Add given tag to inventory results [default⎵: ``]. * **fusioninventory__agent_conf_tag**: Add given tag to inventory results [default⎵: ``].
* **fusioninventory__agent_conf_debug**: If debug mode should be enabled [default⎵: `False`]. * **fusioninventory__agent_conf_debug**: If debug mode should be enabled [default⎵: `False`].

View File

@ -222,6 +222,22 @@ fusioninventory__agent_conf_httpd_trust: ''
# #
fusioninventory__agent_conf_log_logger: 'syslog' fusioninventory__agent_conf_log_logger: 'syslog'
# ]]] # ]]]
# .. envvar:: fusioninventory__agent_conf_log_facility: [[[
#
# Specifies the syslog facility to use for the syslog logger backend.
# The possible values are:
#
# ``LOG_DAEMON``
# Default. System daemons without separate facility value.
#
# ``LOG_USER``
# Generic user-level messages
#
# ``…``
# For all possible values, check syslog(3) manual.
#
fusioninventory__agent_conf_log_facility: 'LOG_DAEMON'
# ]]]
# .. envvar:: fusioninventory__agent_conf_tag [[[ # .. envvar:: fusioninventory__agent_conf_tag [[[
# #
# Add given tag to inventory results # Add given tag to inventory results

View File

@ -137,8 +137,10 @@ logger = {{ fusioninventory__agent_conf_log_logger }}
#logfile = /var/log/fusioninventory.log #logfile = /var/log/fusioninventory.log
# maximum log file size, in MB # maximum log file size, in MB
#logfile-maxsize = 0 #logfile-maxsize = 0
{% if fusioninventory__agent_conf_log_logger == 'syslog' %}
# Syslog facility # Syslog facility
logfacility = LOG_DAEMON logfacility = {{ fusioninventory__agent_conf_log_facility }}
{% endif %}
# Use color in the console # Use color in the console
color = 0 color = 0