Hi,

I'm using Ansible to provision an application deployment.

here is my structure

hosts
[dbservers]
db.local

[memcached]
mc.local

[appservers]
app1.local
#app2.local


I'm using Tomcat and have a context like this in appservers ( app1.local)
roles/tomcat/templates/context.j2

<Context path="" reloadable="false" docBase="/apps/deploy/current" 
workDir="work" >
 <Environment name="memcached" value="*mc.local*" type="java.lang.String" 
override="false"/>
 <Manager className="de.javakaffee.web.msm.MemcachedBackupSessionManager"

   <Resource   name="jdbc/postgres/configuration"
      
        url="jdbc:postgresql://*db.local*:5432/configuration"
   />
</Context>

My questions are:
+ How can I resolve mc.local ( db.local) to IP?
Doing this, I don't have to set  hosts in appservers like
/etc/hosts
192.168.. mc.local
....

+ In case of using dymamic inventory ( Ec2), how can I refer a db ( from db 
tags), resolve its ip and resolve the template.
+ Or is there another way to accomplish this?

I guess this model is trivial and should have a normal way out there ( but 
I'm still a Ansible newbie to get it)

Thanks,
Pilgrim


-- 
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/cc631346-482e-4dc3-9d90-e4126772eff2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to