first version
This commit is contained in:
parent
d07f69b033
commit
9251a50060
14 changed files with 374 additions and 0 deletions
tasks
46
tasks/main.yml
Normal file
46
tasks/main.yml
Normal file
|
@ -0,0 +1,46 @@
|
|||
---
|
||||
- name: install dependencies packages
|
||||
apt:
|
||||
name: apt-transport-https
|
||||
retries: 2
|
||||
register: result
|
||||
until: result is succeeded
|
||||
tags: elasticsearch
|
||||
|
||||
- name: add repository key
|
||||
apt_key:
|
||||
url: https://artifacts.elastic.co/GPG-KEY-elasticsearch
|
||||
retries: 2
|
||||
register: result
|
||||
until: result is succeeded
|
||||
tags: elasticsearch
|
||||
|
||||
- name: add repository
|
||||
apt_repository:
|
||||
repo: deb https://artifacts.elastic.co/packages/7.x/apt stable main
|
||||
tags: elasticsearch
|
||||
|
||||
- name: install package
|
||||
apt:
|
||||
name: elasticsearch
|
||||
retries: 2
|
||||
register: result
|
||||
until: result is succeeded
|
||||
tags: elasticsearch
|
||||
|
||||
- name: copy config file
|
||||
copy:
|
||||
content: '{{ elasticsearch_full_config|to_yaml }}'
|
||||
dest: /etc/elasticsearch/elasticsearch.yml
|
||||
owner: root
|
||||
group: elasticsearch
|
||||
mode: 0640
|
||||
notify: restart elasticsearch
|
||||
tags: elasticsearch
|
||||
|
||||
- name: enable and start service
|
||||
systemd:
|
||||
name: elasticsearch
|
||||
state: started
|
||||
enabled: true
|
||||
tags: elasticsearch
|
Loading…
Add table
Add a link
Reference in a new issue