diff --git a/CHANGELOG.md b/CHANGELOG.md index c5d7fbf..20ea141 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## v1.X.Y + +### Add +* Now manage tag with fusioninventory__agent_conf_tag variable. + ## v1.3.1 ### Fix diff --git a/README.md b/README.md index d0d1cf2..0da6cbf 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,7 @@ 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_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_tag** : Add given tag to inventory results [default⎵: ``]. * **fusioninventory__agent_conf_debug** : If debug mode should be enabled [default⎵: `False`]. ## Example Playbook diff --git a/defaults/main.yml b/defaults/main.yml index 1cbe9be..a30d2e6 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -181,6 +181,16 @@ fusioninventory__agent_conf_httpd_port: '62354' # Default. # fusioninventory__agent_conf_httpd_trust: '' + # ]]] +# .. 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 [[[ # diff --git a/templates/etc/fusioninventory/agent.cfg.j2 b/templates/etc/fusioninventory/agent.cfg.j2 index 27178cd..dc64555 100644 --- a/templates/etc/fusioninventory/agent.cfg.j2 +++ b/templates/etc/fusioninventory/agent.cfg.j2 @@ -141,7 +141,7 @@ color = 0 # # add given tag to inventory results -tag = +tag = {{ fusioninventory__agent_conf_tag }} {% if fusioninventory__agent_conf_debug %} # enable debug mode debug = 1