How to push a file to a dynamic location?
I am writing a DBA module and want to start with pushing the tnsnames.ora file to all the nodes. I am having trouble because the tnsnames.ora file needs to be pushed to $oracle_home/network/admin but the oracle_home directory is different on some nodes based on oracle version, type of server, etc. We have about 15 different variations of our oracle_home directory.
My thought is to either
create a fact that will pull the oracle_home information from the os environment variable $ORACLE_HOME but I'm not sure how or if it is even possible.
pull the oracle home from a file with a list of the oracle homes but again I am not sure if that it possible.
Any help would be appreciated!