[Fusioninventory-devel] better way to pass parameters to fusioninventory-agent

Gonéri Le Bouder goneri at rulezlan.org
Wed Jun 13 12:47:52 UTC 2012


2012/6/13 Guillaume Rousse <guillomovitch at gmail.com>:
> Le 12/06/2012 14:34, Gonéri Le Bouder a écrit :

Hi Guillaume,

> We already had task-specific parameters (such as inventory-only parameters), now we
> have task-and-target-specific parameters, which only apply to a specific task applied to
> a specific target...
much like --local /tmp and --stdout today.

> May I suggest to add for
> instance --stdout-inventory-no-printer option, for excluding printers from
> the inventory, but only when run against 'stderr' target ?
:D

(...)
> The current execution model is ugly, and this kind of workaround won't help
> fixing it.

This parameters are confusing because there are all about “Inventory” whereas
the agent can do more.
A suggestion, we can rename them with an "$taskName_" prefix like
inventory_no-category= and load the default value from an INI style
configuration file:

______________________________
  $ cat /etc/fusioninventory/targets.d/myfirsttarget.ini
  [target]
  name="Local"
  directory=/tmp

  [inventory]
  no-category=software
  format=xml

  $ cat /etc/fusioninventory/targets.d/myserver.ini
  [target]
  name="Public server"
  server=https://somewhere/

  [inventory]
  no-category=software
  format=xml

  [netinventory]

  [netdiscovery]

  [deploy]
  p2p=1
______________________________

This would be an nice way to avoid to run all the tasks in a row when
people only want
and inventory.


Best regards,
-- 
     Gonéri Le Bouder



More information about the Fusioninventory-devel mailing list