diff --git a/CHANGELOG.md b/CHANGELOG.md index 20ea141..03ffeb4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,9 @@ ## v1.X.Y ### Add -* Now manage tag with fusioninventory__agent_conf_tag variable. +* Manage new parameters: + * **tag** with fusioninventory__agent_conf_tag variable + * **no-task** with fusioninventory__agent_conf_no_task variable ## v1.3.1 diff --git a/README.md b/README.md index 0da6cbf..eb7cf3b 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,7 @@ 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_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_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_scan_homedirs** : Enable the scan of user home directories [default⎵: `False`]. diff --git a/defaults/main.yml b/defaults/main.yml index a30d2e6..2d10f5e 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -85,6 +85,17 @@ fusioninventory__agent_conf_server_url: '' # 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_delaytime [[[ # @@ -98,6 +109,9 @@ fusioninventory__agent_conf_delaytime: '3600' # Do not list given category items in inventory task. # Should be a string with comma as a separator between categories. # +# ``''`` +# Default. Empty so all categories are listed. +# fusioninventory__agent_conf_no_category: '' # ]]] diff --git a/templates/etc/fusioninventory/agent.cfg.j2 b/templates/etc/fusioninventory/agent.cfg.j2 index dc64555..9a2cccc 100644 --- a/templates/etc/fusioninventory/agent.cfg.j2 +++ b/templates/etc/fusioninventory/agent.cfg.j2 @@ -29,6 +29,9 @@ local = {{ fusioninventory__agent_conf_local_dir }} # disable software deployment tasks #no-task = deploy +{% if fusioninventory__agent_conf_no_task %} +no-task = {{ fusioninventory__agent_conf_no_task }} +{% endif %} #tasks = inventory,deploy,inventory #