-
Notifications
You must be signed in to change notification settings - Fork 857
Elasticsearch trying to resolve YAML anchor #666
Comments
Found this post https://stackoverflow.com/a/51272986/12757079 |
It seems like YAML anchors aren't working at all (I'm running 7.5.2). I tried the following config snippet: xpack:
security:
enabled: true
http:
ssl:
enabled: true
keystore: &keystore
path: /usr/share/elasticsearch/config/keystore.p12
type: PKCS12
password: ${ES_SECRET}
key_password: ${ES_SECRET}
transport:
ssl:
enabled: true
verification_mode: certificate
keystore: *keystore
truststore:
path: /usr/share/elasticsearch/config/truststore.p12
type: PKCS12
password: ${ES_SECRET} Which gives me:
When it seems to me that, if the anchor is properly resolved, it should work just fine. xpack:
security:
enabled: true
http:
ssl:
enabled: true
keystore:
path: &ks_path /usr/share/elasticsearch/config/keystore.p12
type: &ks_type PKCS12
password: &ks_pwd ${ES_SECRET}
key_password: &ks_kpwd ${ES_SECRET}
transport:
ssl:
enabled: true
verification_mode: certificate
keystore:
path: *ks_path
type: *ks_type
password: *ks_pwd
key_password: *ks_kpwd
truststore:
path: /usr/share/elasticsearch/config/truststore.p12
type: *ks_type
password: *ks_pwd But to no avail:
I think it's safe to assume that if you're using YAML for your configuration file, one is allowed to use YAML features such as anchors and aliases. In practice, this does not seem to work. Whether this is expected or not is not clear to me? |
Hi @Callisto88, thank you for reporting this. YAML anchor support issue is directly related to Elasticsearch and is not specifc to this Ansible role. This is tracked in elastic/elasticsearch#51652. I'll close this and let you track progress on the Elasticsearch issue. |
Elasticsearch version
7.5.1
Role version: (If using master please specify github sha)
4fc17bd
JVM version (
java -version
):OS version (
uname -a
if on a Unix-like system):# lsb_release -a No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 9.9 (stretch) Release: 9.9 Codename: stretch
Description of the problem including expected versus actual behaviour:
ES Logs if relevant:
The text was updated successfully, but these errors were encountered: