Added ElasticSearch
This commit is contained in:
parent
6ffc3201f5
commit
d000d9616c
1
playbook/linux/elastic/elastic-7.x.list
Normal file
1
playbook/linux/elastic/elastic-7.x.list
Normal file
@ -0,0 +1 @@
|
|||||||
|
deb https://artifacts.elastic.co/packages/7.x/apt stable main
|
40
playbook/linux/elastic/install-elasticsearch.yml
Normal file
40
playbook/linux/elastic/install-elasticsearch.yml
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
|
||||||
|
|
||||||
|
- name: Install Elasticsearch
|
||||||
|
hosts: elastic
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
- name: Install Elastic GPG Key
|
||||||
|
become: true
|
||||||
|
apt_key:
|
||||||
|
url: "https://artifacts.elastic.co/GPG-KEY-elasticsearch"
|
||||||
|
state: present
|
||||||
|
id: 46095ACC8548582C1A2699A9D27D666CD88E42B4
|
||||||
|
|
||||||
|
- name: Install apt-transport-https
|
||||||
|
apt:
|
||||||
|
name: apt-transport-https
|
||||||
|
- name: Add Elastic Repo
|
||||||
|
become: true
|
||||||
|
copy:
|
||||||
|
src: elastic-7.x.list
|
||||||
|
dest: /etc/apt/sources.list.d/
|
||||||
|
backup: yes
|
||||||
|
|
||||||
|
- name: Update Packages
|
||||||
|
become: true
|
||||||
|
apt:
|
||||||
|
update_cache: true
|
||||||
|
|
||||||
|
- name: Install ElasticSearch
|
||||||
|
become: true
|
||||||
|
apt:
|
||||||
|
name: elasticsearch
|
||||||
|
|
||||||
|
- name: Start Service
|
||||||
|
systemd:
|
||||||
|
daemon_reload: yes
|
||||||
|
enabled: yes
|
||||||
|
name: elasticsearch
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user