public static boolean isLocalElasticsearchEnabled(AppSettings settings) {
    // elasticsearch is enabled on "search" nodes, but disabled on "application" nodes
    if (isClusterEnabled(settings.getProps())) {
      return NodeType.parse(settings.getValue(CLUSTER_NODE_TYPE.getKey()).orElse("")) == NodeType.SEARCH;
    }

    // elasticsearch is enabled in standalone mode
    return true;
  }
@Test
  @UseDataProvider("validIPv4andIPv6Addresses")
  public void isLocalElasticsearchEnabled_returns_true_for_a_application_node(String host) {
    TestAppSettings settings = newSettingsForAppNode(host);

    assertThat(ClusterSettings.isLocalElasticsearchEnabled(settings)).isFalse();
  }