Question #10450
closedUse node inventory data in directives? With substring syntax?
Description
After a bit of searching I found http://www.rudder-project.org/redmine/issues/3112 which seems to be the feature I was looking for but I was a bit confused as I saw that it might have been previously implemented then removed in favor of doing something similar for techniques first. So I am wondering if there is a proposed timeline to bring it back.
Also would it be possible to design a syntax to do a sub-string of the returned data? Something like:
For the variable ${rudder.node.Hardware.BIOS.Name} (containing "VMware Virtual Platform")
using the syntax (:<delimiter>:<start position>:<end position>)
${rudder.node.Hardware.BIOS.Name:" ":0:1 would produce "VMware Virtual"
${rudder.node.Hardware.BIOS.Name:" ":1:2 would produce "Virtual Platform"
Another example:
${rudder.node.Environment.Name[BASEDIR] (containing the value "/opt/rudder/share/commands")
${rudder.node.Environment.Name[BASEDIR]:"/":3:4 would produce "share/commands"
${rudder.node.Environment.Name[BASEDIR]:"/":3:3 would produce "share"
${rudder.node.Environment.Name[BASEDIR]:"/":e:e would produce "commands" (using the character "e" to always represent the end element)
And lastly:
${rudder.node.Hardware.Controllers.Name2 (Containing "53c1030 PCI-X Fusion-MPT Dual Ultra320 SCSI")
${rudder.node.Hardware.Controllers.Name2:" ":2:e would produce "Fusion-MPT Dual Ultra320 SCSI"
${rudder.node.Hardware.Controllers.Name2:"-":0:0 would produce "53c1030 PCI"