2
0
Fork 0

Manage lofile parameters

This commit is contained in:
Jeremy Gardais 2021-08-27 15:17:46 +02:00
parent 74fbd8e653
commit 76cfdf4df1
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
4 changed files with 27 additions and 2 deletions

View File

@ -7,6 +7,8 @@
* **tasks** with fusioninventory__agent_conf_tasks variable
* **logger** with fusioninventory__agent_conf_log_logger variable
* **logfacility** with fusioninventory__agent_conf_log_facility variable
* **logfile** with fusioninventory__agent_conf_log_file variable
* **logfile-maxsize** with fusioninventory__agent_conf_log_file_maxsize variable
## v1.3.1

View File

@ -44,6 +44,8 @@ Some variables used to generate FusionInventery agent.cfg file from Ansible temp
* **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_facility**: Specifies the syslog facility to use for the syslog logger backend [default⎵: `LOG_DAEMON`].
* **fusioninventory__agent_conf_log_file**: Specifies the file to use for the file logger backend [default⎵: `/var/log/fusioninventory.log`].
* **fusioninventory__agent_conf_log_file_maxsize**: Specifies the maximum size for the log file, in MB [default⎵: `0`].
* **fusioninventory__agent_conf_tag**: Add given tag to inventory results [default⎵: ``].
* **fusioninventory__agent_conf_debug**: If debug mode should be enabled [default⎵: `False`].

View File

@ -238,6 +238,25 @@ fusioninventory__agent_conf_log_logger: 'syslog'
#
fusioninventory__agent_conf_log_facility: 'LOG_DAEMON'
# ]]]
# .. envvar:: fusioninventory__agent_conf_log_file: [[[
#
# Specifies the file to use for the file logger backend.
#
# ``/var/log/fusioninventory.log``
# Default.
#
fusioninventory__agent_conf_log_file: '/var/log/fusioninventory.log'
# ]]]
# .. envvar:: fusioninventory__agent_conf_log_file_maxsize: [[[
#
# Specifies the maximum size for the log file, in MB.
# When the max size is reached, the file is truncated.
#
# ``0``
# Default. 0 means unlimited size.
#
fusioninventory__agent_conf_log_file_maxsize: '0'
# ]]]
# .. envvar:: fusioninventory__agent_conf_tag [[[
#
# Add given tag to inventory results

View File

@ -133,10 +133,12 @@ httpd-trust = {{ fusioninventory__agent_conf_httpd_trust }}
# Logger backend, either Stderr, File or Syslog (Stderr)
logger = {{ fusioninventory__agent_conf_log_logger }}
{% if fusioninventory__agent_conf_log_logger == 'file' %}
# log file
#logfile = /var/log/fusioninventory.log
logfile = {{ fusioninventory__agent_conf_log_file }}
# maximum log file size, in MB
#logfile-maxsize = 0
logfile-maxsize = {{ fusioninventory__agent_conf_log_file_maxsize }}
{% endif %}
{% if fusioninventory__agent_conf_log_logger == 'syslog' %}
# Syslog facility
logfacility = {{ fusioninventory__agent_conf_log_facility }}