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
with_items: "{{ elasticsearch.plugins }}"
- name: Set port
replace: >
dest="/etc/elasticsearch/elasticsearch.yml"
regexp='^#?(http\.port\:).*'
replace='\1 {{ elasticsearch.port }}'
- name: Configure Elasticsearch.
lineinfile:
dest: /etc/elasticsearch/elasticsearch.yml
regexp: "{{ item.regexp }}"
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
meta: flush_handlers

View File

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