From 3721747f01b7912b2da00f6c1177bb76ad5e5577 Mon Sep 17 00:00:00 2001 From: James Tombleson Date: Thu, 25 Apr 2019 15:59:42 -0700 Subject: [PATCH] Adding ubuntu directions to elasti role --- roles/elasticsearch/tasks/main.yml | 42 +++++++++++++++------------- roles/elasticsearch/tasks/ubuntu.yml | 8 ++++++ 2 files changed, 31 insertions(+), 19 deletions(-) create mode 100644 roles/elasticsearch/tasks/ubuntu.yml diff --git a/roles/elasticsearch/tasks/main.yml b/roles/elasticsearch/tasks/main.yml index 082d15f..62c35c7 100644 --- a/roles/elasticsearch/tasks/main.yml +++ b/roles/elasticsearch/tasks/main.yml @@ -4,25 +4,29 @@ - name: Test role debug: var=cluster_name -- name: Install Elastic GPG Key - become: true - apt_key: - url: "https://artifacts.elastic.co/GPG-KEY-elasticsearch" - state: present - id: 46095ACC8548582C1A2699A9D27D666CD88E42B4 +- name: Install Elastic Repo + include: install-repo.yml + when: ansible_distribution == "Ubuntu" -- name: Install apt-transport-https - become: true - apt: - name: apt-transport-https + #- name: Install Elastic GPG Key + #become: true + #apt_key: + #url: "https://artifacts.elastic.co/GPG-KEY-elasticsearch" + #state: present + #id: 46095ACC8548582C1A2699A9D27D666CD88E42B4 -- name: Add Elastic Repo - become: true - copy: - dest: '/etc/apt/sources.list.d/elastic-7.x.list' - content: "deb https://artifacts.elastic.co/packages/7.x/apt stable main" +#- name: Install apt-transport-https + # become: true + #apt: + #name: apt-transport-https -- name: Update Packages - become: true - apt: - update_cache: true +#- name: Add Elastic Repo +# become: true +# copy: + # dest: '/etc/apt/sources.list.d/elastic-7.x.list' + # content: "deb https://artifacts.elastic.co/packages/7.x/apt stable main" + + #- name: Update Packages + #become: true + # apt: + # update_cache: true diff --git a/roles/elasticsearch/tasks/ubuntu.yml b/roles/elasticsearch/tasks/ubuntu.yml new file mode 100644 index 0000000..1b8b0f2 --- /dev/null +++ b/roles/elasticsearch/tasks/ubuntu.yml @@ -0,0 +1,8 @@ + + +- name: Install ElasticSearch from apt + become: true + apt: + name: elasticsearch + +- name: