Hello ansible group,

I would like to ask you for some advices related with dynamic inventories 
and variables.
I read Dynamic Inventories documentation from asnbile however still don't 
see clear picture about solution.
So far ansible-tower is also not solution which I can focus on.

So quick 'my issue' which looks like 'chicken and egg' problem ;) 
1. I would like to use ansible to provision servers.
2. I would like to use ansible to do some small changes on servers (for 
example add / remote some account etc - depends of dynamic work)
3. I would like to have records about facts (inlcuding local facts) wich 
can be used for playbooks.
4. I would like to have easy way of reasigning host and different tasks 
will be run.

The way which I see, is that:
1. First initial run of ansible - gathers facts and setup some local facts 
based on varialbe (role / product / environment (test / dev / etc)) 
   (Know already how to use callback functions and record results to DB).
2. Next runs, reads DB (Dynamic Inventory) and setup servers, updating 
local facts as well.
3. I can change some 'flag' in Dynamic Inventory and ansible will run 
different tasks. 

Expected solution is that:
1. I can quickly see on which status is server, for example: 
   - ENV: Development - web servers - completed, 
   - ENV: Testing - ready for application deplyement.
   - Prodcution ---- configuration XXX.
2. When I am going to a server I can quickly see in local facts forder what 
has been done (ini or js file) in terms of configuraiton.

My issue is now that we have a lot of INI inventories files and we 
maintaning quite a lot of servers (250+).
Adding new servers in ini file depends of product line, and is a bit of 
slow, this is why I whould like to have start using dynamic invenotry.
However I am not quite sure how to deal with all these variables which we 
are using. 

I like to assigning server to some group, then I can use it in tempaltes, 
etc. And use variables only for some configuration specific details.

So I would like to ask you in general:
How are you working with ansible day by day when you have to:
- manage big number of hosts where configuration is different (not only web 
server / DB server - but also web servers have different configuration 
[apache, nginx])
- see what has been already done via ansible on server (wihtout reading 
YAML files over and over).
- Dealing with small tasks to adjust configuration on server (for example 
php variables must be adjusted, or apache max_clients have to be decrased, 
etc).
- Quickly add / modify server roles and anothers tasks are running.

Maybe my thinking is too big / too complacated - any replies are welcome. 

Best regards,
Marcin


-- 
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/2fd2f7ed-e6b9-4e0c-b5a0-ce663eb88f04%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to