Since the plugindir variable can be overridden only in $elasticsearch::plugindir, and $elasticsearch::params::plugindir is a static default, the actual configurable variable should be used here.