1 Reply Latest reply on Apr 24, 2014 6:43 AM by Bill Robinson

    Bladelogic configuration file path wildcard

    Mike Brennan

      Hi all,


      I've had a quick look on the forums and cannot find the answer to this question.


      I have two servers that each have 2 apps installed.  These apps contain the same properties file within their installation directorys.

      So you have:










      Is there a way when adding a configuration file entry to the object dictionary to wildcard the App# parts.

      I have tried *, **, ?, regex... none seen to work.


      Now this is a simplified example.  This would need to work on a large scale where the app names were completely different and there were differing numbers of apps installed per server.


      The reason I ask is that these properties files contain the same property_name entries.  e.g.





      However the values of those properties might be different.  I'd want to be able to have a job change these values based on environment and appname, possibly even app instance.  I'm planning to provide this information to BL via a CSV file which is then parsed and makes the changes according to those values.


      Thank you for any help.

        • 1. Re: Bladelogic configuration file path wildcard
          Bill Robinson

          There is unfortunately no simple way to do this.  When you create a cfo, you can give wild card paths, but that will explicitly add whatever the wild card resolves to on the server you provide during the cfo creation.  so for example if you gave the path as /opt/App*/conf/App*_server.properties and you used server2, you'd end up w/ these two cfos:




          normally i would create a component template, create a local property called 'APP_NAME' in the template, then i would add a local cfo to the template like /opt/??APP_NAME??/conf/??APP_NAME??_server.properties.  then i would create local properties instances in the template, one for each possible app name that exists.  then in the discovery condition of the template i would say like 'dir /opt/??APP_NAME?? exists'.  run a discovery job w/ this template against your servers and you will get a bunch of components - one for each app on each server - so in this case you'd have 2 components on each of your servers.


          now, the question is 'how do i populate the possible instances w/ the app name if i don't know them?'  that is usually accomplished w/ a nsh script that goes and finds the possible values, then some blcli to update the template.  yes - this is really backwards - you have to go discover stuff for blade to discover...


          it's been a while since i really messed w/ this area so maybe someone has figured out something more clever but this works...


          now, a great 'idea' would be for the 'discovery' bit to actually find and setup the instances based on a wild card..