Thanks Deniele, Its working....Its printed both Public and Private IP
On Friday, January 13, 2017 at 10:35:28 AM UTC-5, Daniele Testa wrote: > > Amit, this is already available to your scripts in the built-in Global > Variables. Just make a simple script like: > > #!/bin/bash > env > > Then put it on the BeforeHostUp event on one of your Farm Roles and launch > an instance. If you then look in the Orchestration Log, you will be able to > see the complete list of built-in Global Variables that are available to > your script. > > In your specific case, as you need the instance IP address, the name of > the Global Variables are: > > SCALR_INTERNAL_IP > SCALR_EXTERNAL_UP > > Access them in your script as normal Environment Variables, such as: > > echo $SCALR_INTERNAL_IP > echo $SCALR_EXTERNAL_IP > > On Fri, Jan 13, 2017 at 7:14 AM, Amit Saini <[email protected] > <javascript:>> wrote: > >> Thanks Marc >> >> >> On Wednesday, January 11, 2017 at 3:46:22 PM UTC-5, Marc O'Brien wrote: >>> >>> Hi Amit, >>> >>> Depending on the scope of the IPs you are interested in, you should be >>> able to achieve this by using szradm queryenv >>> <https://scalr-wiki.atlassian.net/wiki/display/docs/szradm+queryenv> >>> within your orchestration script. Let us know if you have any questions or >>> troubles with implementation. >>> >>> Many thanks, >>> Wm. Marc O'Brien >>> Scalr Technical Support >>> >>> On Wednesday, January 11, 2017 at 1:37:07 PM UTC-7, Amit Saini wrote: >>>> >>>> Hi Marc, >>>> >>>> I am planning to build a shell script to install the ansible on newly >>>> created instances because of that i need the Instance's IP address >>>> >>>> Regards >>>> Amit Saini >>>> >>>> On Wednesday, January 11, 2017 at 3:29:48 PM UTC-5, Marc O'Brien wrote: >>>>> >>>>> Hi Amit, >>>>> >>>>> As Jeff noted, we need to get a bit of additional context about your >>>>> use case so that we may provide the best recommendation. Are you >>>>> attempting to query this from the Scalr server and retrieve results from >>>>> the Scalr database, or are you looking to obtain this information on your >>>>> running instances as part of an Orchestration script? Otherwise, are you >>>>> looking to gather this information from your local workstation? What do >>>>> you >>>>> plan to do with these IPs once you have your query results? This >>>>> information will help to clarify your needs and isolate the best method >>>>> to >>>>> achieve your desired results. >>>>> >>>>> Many thanks, >>>>> Wm. Marc O'Brien >>>>> Scalr Technical Support >>>>> >>>>> >>>>> On Monday, January 9, 2017 at 2:48:55 PM UTC-7, Amit Saini wrote: >>>>>> >>>>>> Hi, >>>>>> >>>>>> Is there any shell script to get the IP address of running instance >>>>>> from scalr database...?? >>>>>> >>>>>> >>>>>> Regards >>>>>> >>>>>> Amit Saini >>>>>> >>>>> -- >> You received this message because you are subscribed to the Google Groups >> "scalr-discuss" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Regards, > Daniele Testa | Sr. Solutions Architect @ Scalr | [email protected] > <javascript:> | www.scalr.com | blog.scalr.com > -- You received this message because you are subscribed to the Google Groups "scalr-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
