Hi,

I can imagine that, with more and more environments it can be tricky,
however it seems we can easily manage our development, staging and 
production environemnts, with Michael's latest advice.

Currently we have the following directory layout (roughly) and our 
inventory files looking like I wrote in my previous message:

.
├── inventory
│   ├── group_vars
│   │   ├── all.yml
│   │   ├── development.yml
│   │   ├── loadbalancers.yml
│   │   ├── production.yml
│   │   ├── staging.yml
│   │   └── webservers.yml
│   ├── development
│   ├── production
│   └── staging
├── roles
│   ├── loadbalancer
│   ├── webserver
├── loadbalancers.yml
├── site.yml
└── webservers.yml

... and I can say that it's working very well for us. ;)

According to your desire to find a way to get informed about loaded var 
files,
maybe worth to take a look around Ansible callbacks, 
here<http://www.ansible.com/blog/listen-to-your-servers-talk>is a nice post 
about it,
not sure if is there a callback for this, it's just an idea. ;)

--
Kalman


On Thursday, April 3, 2014 1:40:07 PM UTC+2, Marcin Prączko wrote:
>
> Hi Kalman, 
>
> I have to deal with similar challange as well.
> IMHO design is good however with complex configuraiton is starting quite 
> challanging.
> We have much more environment to setup for the same product and is not 
> easy to do that with inventories and groups.
> (for example we have Dev on local machines / Dev-Test on ESXi / 
> Pre-production / Dedicated servers / RackSpace cloud. 
> And each of this evnrionment have something different
> - for example RackSpace cloud is behind NAT - so you can't use IP from 
> fact to update nagios rules on remote server, you must map this to 
> exterrnal IP
> - Dealing with apache vhosts configuration - different domains for 
> internal testings and production environment. 
>
> Challnages which we have at this moment:
> - Be sure which variable is used, Ansible documentation says that variable 
> should be define only in one place, and with complex configuration this is 
> not easy especially if environmentens are differnt.
> - Detecting whether variable is defined or not before run plays (is quite 
> hard to find out whehre I should put variable if nasible complains in the 
> middle of runing - 'variable' not defined'
>
> I am not saying that this is bad, etc. I am just saying that is challaning 
> (at least for me) manage or variables in proper way (so far) to allow easy 
> run playbook on all targets (producton / dev / test / etc).
>
> So, have hope that we will find the right way. 
>
> PS.
> I am trying to find a way whether there is possible to force ansible to 
> inform me about variable files which has been loaded.
> For example when you're using ''var_files'' with many files - search for 
> first - ansible reports which file was readed: Loaded var file .... 
> CentOS.yml, would be very nice to have option to see this as well for 
> default variables like group_vars / hosts_vars, etc.
> We will see what is possible to achieve.
>
> Good luck.
>
> Best regards,
> Marcin Praczko
>
>

-- 
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/b85d7d9b-8ffc-4245-bd9e-66a2f0e15e9c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to