i needed to perform compliance on the app once i found it, so i ran an nsh script to find my bits that then added a new local property instance w/ the path to the bits, then ran discovery, then compliance.
Would it be possible for you to elaborate a bit more?
so attached is what i used.
the xml files goes in /br/xml/cli on the server you run the script from.
the 'find_oracle_instances' goes out and looks for instances of oracle on the target systems and adds instances to a pre-created template for oracle.
'set_config_files' adds local 'config files' to the template (config file objects that get parsed by the grammar engine)
'set_oracle_component_properties' goes and sets properties on specific components (i needed to set the uid and gid for oracle on each component for some other compliance checking)
so the idea is for the 1st script to run, and find oracle on all my boxes by looking in /var/opt/oratab and then create the local parameter instances in that step.
there might be a better way to do this by using a 'bulkCreate' command in the Template namespace, but the idea is the same - find everything, create the instances, then in the 'discovery' for the template you look for something unique to each instance. so you're 'finding' things twice.
right now we don't have a 'find *.foo' type of discovery in the discovery mechanism or CT, so until then this seems to be the best way to do it.
see this thread too:
so hopefully some of that made sense :)
i've actually followed another route
i made a script that parses a csv file as
than it scans the filesystem searching for <filename-size> matches.
it just outputs a txt report of findings, so no components and no fancy reports, but generating a component for each software item would have filled up my db with thousands of component templates.
i should clean it a bit before posting so i will do it if someone actually requests it
If you're still interested, we've been working a lot on this.
Your approach will work, but I recommend running the find command just once, and save the content on a text file. This will increase the overall script performance.
After that, you can run a grep on the returned text file, and perform all the other operations after that.
In our experience, the find operation is the one that slows down the entire process.