Compare commits
9 Commits
12775009ae
...
61644d90ca
Author | SHA1 | Date |
---|---|---|
|
61644d90ca | |
|
89d8e1ea57 | |
|
76cfdf4df1 | |
|
74fbd8e653 | |
|
4ec60b99b3 | |
|
f89a1c4cf3 | |
|
068ded4376 | |
|
880b2cd427 | |
|
f40b672121 |
13
CHANGELOG.md
13
CHANGELOG.md
|
@ -1,3 +1,16 @@
|
||||||
|
## v1.4.0
|
||||||
|
|
||||||
|
### Add
|
||||||
|
* Manage new parameters:
|
||||||
|
* **tag** with fusioninventory__agent_conf_tag variable
|
||||||
|
* **no-task** with fusioninventory__agent_conf_no_task variable
|
||||||
|
* **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
|
||||||
|
* **color** with fusioninventory__agent_conf_log_color variable
|
||||||
|
|
||||||
## v1.3.1
|
## v1.3.1
|
||||||
|
|
||||||
### Fix
|
### Fix
|
||||||
|
|
|
@ -31,6 +31,8 @@ Some variables used to generate FusionInventery agent.cfg file from Ansible temp
|
||||||
|
|
||||||
* **fusioninventory__agent_conf_server_url** : The URL of your Fusioninventory-server/GLPI/… [default⎵: ``].
|
* **fusioninventory__agent_conf_server_url** : The URL of your Fusioninventory-server/GLPI/… [default⎵: ``].
|
||||||
* **fusioninventory__agent_conf_local_dir** : Write tasks results in a directory [default⎵: ``].
|
* **fusioninventory__agent_conf_local_dir** : Write tasks results in a directory [default⎵: ``].
|
||||||
|
* **fusioninventory__agent_conf_no_task** : Do not run given task (separated by a comma) [default⎵: ``].
|
||||||
|
* **fusioninventory__agent_conf_tasks** : Run given tasks in given order (separated by a comma) [default⎵: ``].
|
||||||
* **fusioninventory__agent_conf_delaytime** : Set an initial delay before the first target [default⎵: `3600`].
|
* **fusioninventory__agent_conf_delaytime** : Set an initial delay before the first target [default⎵: `3600`].
|
||||||
* **fusioninventory__agent_conf_no_category** : Do not list given category items in inventory task (separated by a comma) [default⎵: ``].
|
* **fusioninventory__agent_conf_no_category** : Do not list given category items in inventory task (separated by a comma) [default⎵: ``].
|
||||||
* **fusioninventory__agent_conf_scan_homedirs** : Enable the scan of user home directories [default⎵: `False`].
|
* **fusioninventory__agent_conf_scan_homedirs** : Enable the scan of user home directories [default⎵: `False`].
|
||||||
|
@ -40,6 +42,12 @@ Some variables used to generate FusionInventery agent.cfg file from Ansible temp
|
||||||
* **fusioninventory__agent_conf_httpd_ip** : Interface/IP, the webserver server should listen to [default⎵: ``].
|
* **fusioninventory__agent_conf_httpd_ip** : Interface/IP, the webserver server should listen to [default⎵: ``].
|
||||||
* **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_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_log_color** : Enables color display for the stderr logger backend [default⎵: `False`].
|
||||||
|
* **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`].
|
||||||
|
|
||||||
## Example Playbook
|
## Example Playbook
|
||||||
|
|
|
@ -85,6 +85,28 @@ fusioninventory__agent_conf_server_url: ''
|
||||||
#
|
#
|
||||||
fusioninventory__agent_conf_local_dir: ''
|
fusioninventory__agent_conf_local_dir: ''
|
||||||
|
|
||||||
|
# ]]]
|
||||||
|
# .. envvar:: fusioninventory__agent_conf_no_task [[[
|
||||||
|
#
|
||||||
|
# Do not run given task.
|
||||||
|
# Should be a string with comma as a separator between tasks.
|
||||||
|
#
|
||||||
|
# ``''``
|
||||||
|
# Default. Empty so all tasks are runned.
|
||||||
|
#
|
||||||
|
fusioninventory__agent_conf_no_task: ''
|
||||||
|
|
||||||
|
# ]]]
|
||||||
|
# .. envvar:: fusioninventory__agent_conf_tasks [[[
|
||||||
|
#
|
||||||
|
# Run given tasks in given order.
|
||||||
|
# Should be a string with comma as a separator between tasks.
|
||||||
|
#
|
||||||
|
# ``''``
|
||||||
|
# Default. Empty so default order is applied.
|
||||||
|
#
|
||||||
|
fusioninventory__agent_conf_tasks: ''
|
||||||
|
|
||||||
# ]]]
|
# ]]]
|
||||||
# .. envvar:: fusioninventory__agent_conf_delaytime [[[
|
# .. envvar:: fusioninventory__agent_conf_delaytime [[[
|
||||||
#
|
#
|
||||||
|
@ -98,6 +120,9 @@ fusioninventory__agent_conf_delaytime: '3600'
|
||||||
# Do not list given category items in inventory task.
|
# Do not list given category items in inventory task.
|
||||||
# Should be a string with comma as a separator between categories.
|
# Should be a string with comma as a separator between categories.
|
||||||
#
|
#
|
||||||
|
# ``''``
|
||||||
|
# Default. Empty so all categories are listed.
|
||||||
|
#
|
||||||
fusioninventory__agent_conf_no_category: ''
|
fusioninventory__agent_conf_no_category: ''
|
||||||
|
|
||||||
# ]]]
|
# ]]]
|
||||||
|
@ -181,6 +206,79 @@ fusioninventory__agent_conf_httpd_port: '62354'
|
||||||
# Default.
|
# Default.
|
||||||
#
|
#
|
||||||
fusioninventory__agent_conf_httpd_trust: ''
|
fusioninventory__agent_conf_httpd_trust: ''
|
||||||
|
# ]]]
|
||||||
|
# .. envvar:: fusioninventory__agent_conf_log_logger: [[[
|
||||||
|
#
|
||||||
|
# Specifies the logger backend to use. The possible values are:
|
||||||
|
#
|
||||||
|
# ``syslog``
|
||||||
|
# Default. Log messages through the local syslog server.
|
||||||
|
#
|
||||||
|
# ``file``
|
||||||
|
# Log messages in a file.
|
||||||
|
#
|
||||||
|
# ``stderr``
|
||||||
|
# Log messages directly in the console.
|
||||||
|
#
|
||||||
|
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_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_log_color [[[
|
||||||
|
#
|
||||||
|
# Enables color display for the stderr logger backend. Possible options :
|
||||||
|
#
|
||||||
|
# ``False``
|
||||||
|
# Default.
|
||||||
|
#
|
||||||
|
# ``True``
|
||||||
|
# Enable colors.
|
||||||
|
#
|
||||||
|
fusioninventory__agent_conf_log_color: False
|
||||||
|
|
||||||
|
# ]]]
|
||||||
|
# .. envvar:: fusioninventory__agent_conf_tag [[[
|
||||||
|
#
|
||||||
|
# Add given tag to inventory results
|
||||||
|
#
|
||||||
|
# ``''``
|
||||||
|
# Default. Empty so results are send without any tag.
|
||||||
|
#
|
||||||
|
fusioninventory__agent_conf_tag: ''
|
||||||
|
|
||||||
# ]]]
|
# ]]]
|
||||||
# .. envvar:: fusioninventory__agent_conf_debug [[[
|
# .. envvar:: fusioninventory__agent_conf_debug [[[
|
||||||
#
|
#
|
||||||
|
|
|
@ -4,6 +4,7 @@ dependencies: []
|
||||||
|
|
||||||
galaxy_info:
|
galaxy_info:
|
||||||
role_name: fusioninventory
|
role_name: fusioninventory
|
||||||
|
namespace: ipr-cnrs
|
||||||
author: "Jérémy Gardais"
|
author: "Jérémy Gardais"
|
||||||
description: "Manage FusionInventory Agent"
|
description: "Manage FusionInventory Agent"
|
||||||
license: WTFPL
|
license: WTFPL
|
||||||
|
|
|
@ -1,15 +1,12 @@
|
||||||
# {{ ansible_managed }}
|
# {{ ansible_managed }}
|
||||||
|
# .. vim: foldmarker=[[[,]]]:foldmethod=marker
|
||||||
|
|
||||||
# fusioninventory agent configuration
|
# fusioninventory agent configuration
|
||||||
|
|
||||||
# all defined values match default
|
|
||||||
# all commented values are examples
|
# all commented values are examples
|
||||||
|
|
||||||
|
|
||||||
#
|
# Target definition options [[[
|
||||||
# Target definition options
|
|
||||||
#
|
|
||||||
|
|
||||||
# send tasks results to an OCS server
|
# send tasks results to an OCS server
|
||||||
#server = http://server.domain.com/ocsinventory
|
#server = http://server.domain.com/ocsinventory
|
||||||
# send tasks results to a FusionInventory for GLPI server
|
# send tasks results to a FusionInventory for GLPI server
|
||||||
|
@ -23,27 +20,30 @@ server = {{ fusioninventory__agent_conf_server_url }}
|
||||||
local = {{ fusioninventory__agent_conf_local_dir }}
|
local = {{ fusioninventory__agent_conf_local_dir }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
#
|
# ]]]
|
||||||
# Task definition options
|
|
||||||
#
|
|
||||||
|
|
||||||
|
# Task definition options [[[
|
||||||
# disable software deployment tasks
|
# disable software deployment tasks
|
||||||
#no-task = deploy
|
#no-task = deploy
|
||||||
|
{% if fusioninventory__agent_conf_no_task %}
|
||||||
|
no-task = {{ fusioninventory__agent_conf_no_task }}
|
||||||
|
{% endif %}
|
||||||
#tasks = inventory,deploy,inventory
|
#tasks = inventory,deploy,inventory
|
||||||
|
{% if fusioninventory__agent_conf_tasks %}
|
||||||
|
tasks = {{ fusioninventory__agent_conf_tasks }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
#
|
# ]]]
|
||||||
# Target scheduling options
|
|
||||||
#
|
|
||||||
|
|
||||||
|
# Target scheduling options [[[
|
||||||
# maximum delay before first target, in seconds
|
# maximum delay before first target, in seconds
|
||||||
delaytime = {{ fusioninventory__agent_conf_delaytime }}
|
delaytime = {{ fusioninventory__agent_conf_delaytime }}
|
||||||
# do not contact the target before next scheduled time
|
# do not contact the target before next scheduled time
|
||||||
lazy = 0
|
lazy = 0
|
||||||
|
|
||||||
#
|
# ]]]
|
||||||
# Inventory task specific options
|
|
||||||
#
|
|
||||||
|
|
||||||
|
# Inventory task specific options [[[
|
||||||
# do not list local printers
|
# do not list local printers
|
||||||
# no-category = printer
|
# no-category = printer
|
||||||
{% if fusioninventory__agent_conf_no_category %}
|
{% if fusioninventory__agent_conf_no_category %}
|
||||||
|
@ -72,17 +72,15 @@ force = 0
|
||||||
# additional inventory content file
|
# additional inventory content file
|
||||||
additional-content =
|
additional-content =
|
||||||
|
|
||||||
#
|
# ]]]
|
||||||
# Package deployment task specific options
|
|
||||||
#
|
|
||||||
|
|
||||||
|
# Package deployment task specific options [[[
|
||||||
# do not use peer to peer to download files
|
# do not use peer to peer to download files
|
||||||
no-p2p = 0
|
no-p2p = 0
|
||||||
|
|
||||||
#
|
# ]]]
|
||||||
# Network options
|
|
||||||
#
|
|
||||||
|
|
||||||
|
# Network options [[[
|
||||||
# proxy address
|
# proxy address
|
||||||
proxy =
|
proxy =
|
||||||
# user name for server authentication
|
# user name for server authentication
|
||||||
|
@ -103,10 +101,9 @@ no-ssl-check = 0
|
||||||
# connection timeout, in seconds
|
# connection timeout, in seconds
|
||||||
timeout = 180
|
timeout = 180
|
||||||
|
|
||||||
#
|
# ]]]
|
||||||
# Web interface options
|
|
||||||
#
|
|
||||||
|
|
||||||
|
# Web interface options [[[
|
||||||
{% if fusioninventory__agent_conf_no_httpd %}
|
{% if fusioninventory__agent_conf_no_httpd %}
|
||||||
# disable embedded web server
|
# disable embedded web server
|
||||||
no-httpd = 1
|
no-httpd = 1
|
||||||
|
@ -121,27 +118,34 @@ httpd-port = {{ fusioninventory__agent_conf_httpd_port }}
|
||||||
# trust requests without authentication token
|
# trust requests without authentication token
|
||||||
httpd-trust = {{ fusioninventory__agent_conf_httpd_trust }}
|
httpd-trust = {{ fusioninventory__agent_conf_httpd_trust }}
|
||||||
|
|
||||||
#
|
# ]]]
|
||||||
# Logging options
|
|
||||||
#
|
|
||||||
|
|
||||||
|
# Logging options [[[
|
||||||
# Logger backend, either Stderr, File or Syslog (Stderr)
|
# Logger backend, either Stderr, File or Syslog (Stderr)
|
||||||
logger = syslog
|
logger = {{ fusioninventory__agent_conf_log_logger }}
|
||||||
|
{% if fusioninventory__agent_conf_log_logger == 'file' %}
|
||||||
# log file
|
# log file
|
||||||
#logfile = /var/log/fusioninventory.log
|
logfile = {{ fusioninventory__agent_conf_log_file }}
|
||||||
# maximum log file size, in MB
|
# 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
|
# Syslog facility
|
||||||
logfacility = LOG_DAEMON
|
logfacility = {{ fusioninventory__agent_conf_log_facility }}
|
||||||
# Use color in the console
|
{% endif %}
|
||||||
|
{% if fusioninventory__agent_conf_log_color %}
|
||||||
|
# Use color in the console with stderr backend
|
||||||
|
color = 1
|
||||||
|
{% else %}
|
||||||
|
# Don't use color in the console with stderr backend
|
||||||
color = 0
|
color = 0
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
#
|
# ]]]
|
||||||
# Execution mode options
|
|
||||||
#
|
|
||||||
|
|
||||||
|
# Execution mode options [[[
|
||||||
# add given tag to inventory results
|
# add given tag to inventory results
|
||||||
tag =
|
tag = {{ fusioninventory__agent_conf_tag }}
|
||||||
{% if fusioninventory__agent_conf_debug %}
|
{% if fusioninventory__agent_conf_debug %}
|
||||||
# enable debug mode
|
# enable debug mode
|
||||||
debug = 1
|
debug = 1
|
||||||
|
@ -151,7 +155,9 @@ debug = 0
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
# time to wait to reload config (0 means no reload, it's default value)
|
# time to wait to reload config (0 means no reload, it's default value)
|
||||||
# conf-reload-interval = 0
|
# conf-reload-interval = 0
|
||||||
|
|
||||||
|
# ]]]
|
||||||
|
|
||||||
# Since 2.4, you can include all .cfg files from a folder or any given file
|
# Since 2.4, you can include all .cfg files from a folder or any given file
|
||||||
# For example:
|
# For example:
|
||||||
|
|
Reference in New Issue