I'm using Ansible to deploy and maintain Hadoop clusters.
I used to define variables in group_vars/all as shown below:
hadoop:
# Variables for core-site.xml
nameservice: hadoop-namenode
# Variables for hdfs-site.xml
dfs_blocksize: 256m
# Variables for mapred-site.xml
mapred_job_tracker: hadoop-jobtracker:8021
However, I have different inventory files, which makes it prone to mistakes.
I can define variables using [all:vars] in inventory files:
[all:vars]
hadoop_nameservice=hadoop-namenode
How can I define inventory-specific variables, while still preserving the structured definition as in group_vars/all?
Thanks a lot!