Add cleanup and version check to Elasticsearch role.