Hello all,
I am new to puppet scripts and my question is related to puppet templates and
variables.
I am working on adding some of missing hadoop configurations in puppet
templates. For example, "hadoop.tmp.dir" config is missing in core-site.xml
puppet template. So, to add these missing configs, I am using
extlookup("hadoop_tmp_dir", "") method to look for correponding config value if
present in site.csv file. So, if no key,value pair is present in site.csv, the
default value will be "". In the puppet templates, I can check for config != ""
to confirm if there is a user specified value for the config and write the
configuration to the xml file.
I would like to use undef instead of emptry string ("") as default value in
extlookup() method. But, I couldn't find a good way to check if $variable !=
undef in puppet scripting.
I would like to know the bigtop devs opinion on this.
Also, I am planning to create a global class for holding all configurable
hadoop settings like the one I mentioned above and refer those variables in the
puppet templates like scope.lookupvar('hadoop_configs::hadoop_config_tmp_dir')
where hadoop_configs is the global class which holds all the configuration
variables. Your opinion is greatly appreciated.
Thanks,
Vishnu