Jean, there is /etc/oratab file, but I am not able to read exact value from that file. As if there are multiple databases are running with different homes, its bit difficult to read /etc/oratab. But if you are aware of reading values from it and saving in variable, please help me with it.
On Saturday, May 16, 2020 at 2:57:04 PM UTC+5:30, Jean-Yves LENHOF wrote: > > There's no /etc/oratab on yours servers ? > > Regards, > > > Le 16/05/2020 à 08:30, Akshay Bora a écrit : > > Hi Everyone, > > I am writing an ansible script to automate the task of oracle database > shutdown and startup. I am facing a difficulty in reading the environment > variables from the XML files. > > Sample XML File: > > [oracle@rac1 ContentsXML]$ more inventory.xml > <?xml version="1.0" standalone="yes" ?> > <!-- Copyright (c) 1999, 2014, Oracle and/or its affiliates. > All rights reserved. --> > <!-- Do not modify the contents of this file by hand. --> > <INVENTORY> > <VERSION_INFO> > <SAVED_WITH>12.1.0.2.0</SAVED_WITH> > <MINIMUM_VER>2.1.0.6.0</MINIMUM_VER> > </VERSION_INFO> > <HOME_LIST> > <HOME NAME="OraGI12Home1" LOC="/grid/app/product/12.1.0" TYPE="O" IDX="1" > CRS="true"/> > <HOME NAME="OraDB12Home1" LOC="/oracle/app/product/12.1.0" TYPE="O" > IDX="2"/> > </HOME_LIST> > <COMPOSITEHOME_LIST> > </COMPOSITEHOME_LIST> > </INVENTORY> > [oracle@rac1 ContentsXML]$ > > One challenge for this is the path of this XML file is not same on every > server. > > Can someone please help me to fetch the exact path of the xml file and > grep the value of OraDB12Home1= /oracle/app/product/12.1.0 out of xml and > store in ansible variable? > > -- > You received this message because you are subscribed to the Google Groups > "Ansible Project" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] <javascript:>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/d78cb9de-e120-4f5e-9414-8576f9c84632%40googlegroups.com > > <https://groups.google.com/d/msgid/ansible-project/d78cb9de-e120-4f5e-9414-8576f9c84632%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/9c990ceb-cb31-4c2a-bbda-4ffda26865ff%40googlegroups.com.
