Need suggestion on how to deal the below scenario, as i am working on a story about Oracle EBS clone,
for the Existing shell script project uses different conf files, where it exports the number of variables to linux environment to use it later dynamically in the scripts.
Ex:
target_master.conf looks like this in the existing shell script project
export LSID=echo ${TARGET_SID} | tr '[A-Z]' '[a-z]'
export TARGET_ORACLE_HOME=${DBBASEDIR}/base/product/oh1
export DBCONTEXTNAME=${TARGET_SID}_${DBSERVER}
export TNS_ADMIN=${TARGET_ORACLE_HOME}/network/admin/${DBCONTEXTNAME}
export INVENTORYDIR=${DBBASEDIR}/oraInventory
export DBFILEPATH=/u05/${LSID}/data
export LOGFILEPATH=/u02/${LSID}/redo
export ARCHLOGDEST=/u06/${LSID}/arc
#AP
export APCONTEXTNAME=${TARGET_SID}_${APSERVER}
export APINVDIR=${APBASEDIR}/oraInventory
The highlighted variables are exported and also used dynamically. As to store these variables, i
thought of going with variable(ex.yml) files keeping under vars folder according to ansible standards,
but in ansible how can i declare variables to get over this dynamic replacing of values.
I tried doing like below:
target_master.yml
TARGET_ORACLE_HOME: {{DBBASEDIR}}/base/product/oh1
TNS_ADMIN: {{TARGET_ORACLE_HOME}} /network/admin/ {{DBCONTEXTNAME}}
i tried googling it but not enough solutions to figure it out.
How can i make a n number of variables available for the ansible project and how can i dynamically assign
as i was trying to do as above.
ex:
var: firstname
var1: {{ var }}_lastname
The output of var1 should be like firstname_lastname. will this be possible, if yes, please suggest me.