I have a role that configures a JSON file on a server. The JSON file needs know the following variables which are DIFFERENT for each server. This file is the later used to for a script that installs software
[root@ip-172-29-100-198 roles]# cat elasticconfig/**defaults/**main.yml
You should read this since it have you answers.
https://docs.ansible.com/ansible/latest/user_guide/intro_inventory.html
Either but the variable on every host in the inventory or create host_vars an add one file for each host. But everything is explained in the link.
Thanks Kai I did not realize that the inventory was actually used to set random Variables for hosts, if these variables did not have anything to do with the ssh configuration. Thanks