File tree Expand file tree Collapse file tree 1 file changed +18
-5
lines changed Expand file tree Collapse file tree 1 file changed +18
-5
lines changed Original file line number Diff line number Diff line change 9797 $_keystore_path = $elasticsearch::keystore_path
9898 }
9999
100- $_tls_config = {
101- ' xpack.security.transport.ssl.enabled' => true ,
102- ' xpack.security.http.ssl.enabled' => true ,
103- ' xpack.ssl.keystore.path' => $_keystore_path,
104- ' xpack.ssl.keystore.password' => $elasticsearch::keystore_password ,
100+ # Set the correct xpack. settings based on ES version
101+ if (versioncmp($elasticsearch::version , ' 7' ) >= 0) {
102+ $_tls_config = {
103+ ' xpack.security.http.ssl.enabled' => true ,
104+ ' xpack.security.http.ssl.keystore.path' => $_keystore_path,
105+ ' xpack.security.http.ssl.keystore.password' => $elasticsearch::keystore_password ,
106+ ' xpack.security.transport.ssl.enabled' => true ,
107+ ' xpack.security.transport.ssl.keystore.path' => $_keystore_path,
108+ ' xpack.security.transport.ssl.keystore.password' => $elasticsearch::keystore_password ,
109+ }
110+ }
111+ else {
112+ $_tls_config = {
113+ ' xpack.security.transport.ssl.enabled' => true ,
114+ ' xpack.security.http.ssl.enabled' => true ,
115+ ' xpack.ssl.keystore.path' => $_keystore_path,
116+ ' xpack.ssl.keystore.password' => $elasticsearch::keystore_password ,
117+ }
105118 }
106119
107120 # Trust CA Certificate
You can’t perform that action at this time.
0 commit comments