HI All, 

Not sure how to put this in writing ... hopefully I can make my point 
clear. 

We use ansible for many different hosts to setup basic stuff like ntp/ssh 
access keys etc ..
What I would like to do ( and what works for 1 host ) : 
Create json variable files per host with contents for local facts and motd 
filling of that specific host 

Commandline : ansible-playbook -i 'my-targeted-host,' all.yml --extra-vars 
"@hosts/my-targeted-host.json"

This fills up several variables define throughout the playbook with 
multiple roles
Question 1 : When I omit the json file , I want no changes to be made to 
the taget system in the variables.

Question 2: I would like to run the playbook against multiple hosts and 
have the playbook lookup the specific variables per host from these json 
files (hostname matches .json name)

So in this way I can use these .json files as a "inventory system"  and 
these files can contain info per server like application owner which is 
placed in /etc/motd, when an owners leaves the company I want to do a 
subsitute of the name and rerun the playbook and refill the /etc/motd with 
the new aplication owners name ont the machines with that owner 

Hopefully this is clear .. 
Pleas let me know what is possible ? 

-- 
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/4d2f6fac-2674-4eef-9b99-39cd7167bc6e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to