Simpler restart handling + issue-test for recreation of problems
This commit is contained in:
parent
2c69fbcb40
commit
5e1873ca68
10 changed files with 43 additions and 2 deletions
|
|
@ -28,6 +28,7 @@
|
|||
apt: name=elasticsearch{% if es_version is defined and es_version != "" %}={{ es_version }}{% endif %} state=present force={{force_install}} allow_unauthenticated={{ 'no' if es_apt_key else 'yes' }} cache_valid_time=86400
|
||||
when: es_use_repository
|
||||
register: debian_elasticsearch_install_from_repo
|
||||
notify: restart elasticsearch
|
||||
|
||||
- name: Debian - Download elasticsearch from url
|
||||
get_url: url={% if es_custom_package_url is defined %}{{ es_custom_package_url }}{% else %}{{ es_package_url }}-{{ es_version }}.deb{% endif %} dest=/tmp/elasticsearch-{{ es_version }}.deb validate_certs=no
|
||||
|
|
@ -37,3 +38,4 @@
|
|||
apt: deb=/tmp/elasticsearch-{{ es_version }}.deb
|
||||
when: not es_use_repository
|
||||
register: elasticsearch_install_from_package
|
||||
notify: restart elasticsearch
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@
|
|||
yum: name=elasticsearch{% if es_version is defined and es_version != "" %}-{{ es_version }}{% endif %} state=present update_cache=yes
|
||||
when: es_use_repository
|
||||
register: redhat_elasticsearch_install_from_repo
|
||||
notify: restart elasticsearch
|
||||
until: '"failed" not in redhat_elasticsearch_install_from_repo'
|
||||
retries: 5
|
||||
delay: 10
|
||||
|
|
@ -23,3 +24,4 @@
|
|||
yum: name={% if es_custom_package_url is defined %}{{ es_custom_package_url }}{% else %}{{ es_package_url }}-{{ es_version }}.noarch.rpm{% endif %} state=present
|
||||
when: not es_use_repository
|
||||
register: elasticsearch_install_from_package
|
||||
notify: restart elasticsearch
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
#Copy the config template
|
||||
- name: Copy Configuration File
|
||||
template: src=elasticsearch.yml.j2 dest={{conf_dir}}/elasticsearch.yml owner={{ es_user }} group={{ es_group }} mode=0644 force=yes
|
||||
register: config_updated
|
||||
register: system_change
|
||||
notify: restart elasticsearch
|
||||
|
||||
#Copy the instance specific default file
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
---
|
||||
#Add the elasticsearch user before installing from packages.
|
||||
- name: Ensure optional elasticsearch group is created with the correct id.
|
||||
#Restart if these change
|
||||
notify: restart elasticsearch
|
||||
group:
|
||||
state: present
|
||||
name: "{{ es_group }}"
|
||||
|
|
@ -8,6 +10,8 @@
|
|||
gid: "{{ es_group_id }}"
|
||||
|
||||
- name: Ensure optional elasticsearch user is created with the correct id.
|
||||
#Restart if these change
|
||||
notify: restart elasticsearch
|
||||
user:
|
||||
state: present
|
||||
name: "{{ es_user }}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue