elasticsearch: inline YAML formatting of seed_hosts and initial_master_nodes
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Jérémy Lecour 2021-06-23 22:38:22 +02:00 committed by Jérémy Lecour
parent 4c1ef1bd56
commit 1890a79702
2 changed files with 23 additions and 4 deletions

View File

@ -40,6 +40,7 @@ The **patch** part changes incrementally at each release.
* add default (useless) value for file lookup (first_found)
* fix pipefail option for shell invocations
* elasticsearch: inline YAML formatting of seed_hosts and initial_master_nodes
* evolinux-base: fix motd lookup path
* ldap: fix edge cases where passwords were not set/get properly
* listupgrade: fix wget error + shellcheck cleanup

View File

@ -52,18 +52,36 @@
- name: Configure discovery seed hosts
lineinfile:
dest: /etc/elasticsearch/elasticsearch.yml
line: "discovery.seed_hosts: {{ elasticsearch_discovery_seed_hosts | to_yaml }}"
line: "discovery.seed_hosts: {{ elasticsearch_discovery_seed_hosts | to_yaml(default_flow_style=True) }}"
regexp: "^discovery.seed_hosts:"
when: elasticsearch_discovery_seed_hosts | length > 0
when: elasticsearch_discovery_seed_hosts | default([], True) | length > 0
tags:
- config
- name: Configure empty discovery seed hosts
lineinfile:
dest: /etc/elasticsearch/elasticsearch.yml
regexp: "^discovery.seed_hosts:"
state: absent
when: elasticsearch_discovery_seed_hosts | default([], True) | length <= 0
tags:
- config
- name: Configure initial master nodes
lineinfile:
dest: /etc/elasticsearch/elasticsearch.yml
line: "cluster.initial_master_nodes: {{ elasticsearch_cluster_initial_master_nodes | to_yaml }}"
line: "cluster.initial_master_nodes: {{ elasticsearch_cluster_initial_master_nodes | to_yaml(default_flow_style=True) }}"
regexp: "^cluster.initial_master_nodes:"
when: elasticsearch_cluster_initial_master_nodes | length > 0
when: elasticsearch_cluster_initial_master_nodes | default([], True) | length > 0
tags:
- config
- name: Configure empty initial master nodes
lineinfile:
dest: /etc/elasticsearch/elasticsearch.yml
regexp: "^cluster.initial_master_nodes:"
state: absent
when: elasticsearch_cluster_initial_master_nodes | default([], True) | length <= 0
tags:
- config