PHRAS-1843 Add elasticsearch host setting in vars/all.yml file (#2791)

This commit is contained in:
xrousset78800
2018-11-01 17:13:18 +01:00
committed by jygaulier
parent 737e77b800
commit e113d926c2
2 changed files with 10 additions and 5 deletions

View File

@@ -38,11 +38,15 @@
when: not is_installed when: not is_installed
with_items: "{{ elasticsearch.plugins }}" with_items: "{{ elasticsearch.plugins }}"
- name: Set port - name: Configure Elasticsearch.
replace: > lineinfile:
dest="/etc/elasticsearch/elasticsearch.yml" dest: /etc/elasticsearch/elasticsearch.yml
regexp='^#?(http\.port\:).*' regexp: "{{ item.regexp }}"
replace='\1 {{ elasticsearch.port }}' line: "{{ item.line }}"
state: present
with_items:
- { regexp: '^#? ?network\.host', line: 'network.host: {{ elasticsearch.host }}' }
- { regexp: '^#? ?http\.port', line: 'http.port: {{ elasticsearch.port }}' }
- name: Flush handlers to apply config changes - name: Flush handlers to apply config changes
meta: flush_handlers meta: flush_handlers

View File

@@ -55,6 +55,7 @@ mariadb:
dump: '' dump: ''
elasticsearch: elasticsearch:
install: '1' install: '1'
host: '127.0.0.1'
port: '9200' port: '9200'
version: '2.3.3' version: '2.3.3'
plugins: plugins: