made elasticrepo configurable

This commit is contained in:
Jochen Schneider 2020-01-16 13:26:34 +01:00
parent d328609f29
commit b9b2663b3d
15 changed files with 32 additions and 26 deletions

View File

@ -7,8 +7,10 @@ elasticsearch_jvm_xms: null
elastic_stack_version: 7.5.1 elastic_stack_version: 7.5.1
elasticsearch_lower_disk_requirements: false elasticsearch_lower_disk_requirements: false
elasticrepo_server: https://artifacts.elastic.co/packages/7.x/apt elasticrepo:
elasticrepo_gpg_keyserver: pool.sks-keyservers.net apt: 'https://artifacts.elastic.co/packages/7.x/apt'
yum: 'https://artifacts.elastic.co/packages/7.x/yum'
gpg: 'https://artifacts.elastic.co/GPG-KEY-elasticsearch'
# Cluster Settings # Cluster Settings
single_node: true single_node: true

View File

@ -30,13 +30,13 @@
- name: Debian/Ubuntu | Add Elasticsearch GPG key. - name: Debian/Ubuntu | Add Elasticsearch GPG key.
apt_key: apt_key:
url: "https://artifacts.elastic.co/GPG-KEY-elasticsearch" url: "{{ elasticrepo.gpg }}"
id: 46095ACC8548582C1A2699A9D27D666CD88E42B4 id: 46095ACC8548582C1A2699A9D27D666CD88E42B4
state: present state: present
- name: Debian/Ubuntu | Install Elastic repo - name: Debian/Ubuntu | Install Elastic repo
apt_repository: apt_repository:
repo: "deb {{ elasticrepo_server }} stable main" repo: "deb {{ elasticrepo.apt }} stable main"
state: present state: present
filename: 'elastic_repo_7' filename: 'elastic_repo_7'
update_cache: true update_cache: true

View File

@ -1,6 +1,6 @@
--- ---
- name: Debian/Ubuntu | Removing Elasticsearch repository - name: Debian/Ubuntu | Removing Elasticsearch repository
apt_repository: apt_repository:
repo: deb https://artifacts.elastic.co/packages/7.x/apt stable main repo: "deb {{ elasticrepo.apt }} stable main"
state: absent state: absent
changed_when: false changed_when: false

View File

@ -1,6 +1,6 @@
--- ---
- name: RedHat/CentOS/Fedora | Remove Elasticsearch repository (and clean up left-over metadata) - name: RedHat/CentOS/Fedora | Remove Elasticsearch repository (and clean up left-over metadata)
yum_repository: yum_repository:
name: elastic_repo name: elastic_repo_7
state: absent state: absent
changed_when: false changed_when: false

View File

@ -4,8 +4,8 @@
yum_repository: yum_repository:
name: elastic_repo_7 name: elastic_repo_7
description: Elastic repository for 7.x packages description: Elastic repository for 7.x packages
baseurl: https://artifacts.elastic.co/packages/7.x/yum baseurl: "{{ elasticrepo.yum }}"
gpgkey: https://artifacts.elastic.co/GPG-KEY-elasticsearch gpgkey: "{{ elasticrepo.gpg }}"
gpgcheck: true gpgcheck: true
changed_when: false changed_when: false

View File

@ -9,8 +9,10 @@ elastic_stack_version: 7.5.1
wazuh_version: 3.11.1 wazuh_version: 3.11.1
wazuh_app_url: https://packages.wazuh.com/wazuhapp/wazuhapp wazuh_app_url: https://packages.wazuh.com/wazuhapp/wazuhapp
elasticrepo_server: https://artifacts.elastic.co/packages/7.x/apt elasticrepo:
elasticrepo_gpg_keyserver: pool.sks-keyservers.net apt: 'https://artifacts.elastic.co/packages/7.x/apt'
yum: 'https://artifacts.elastic.co/packages/7.x/yum'
gpg: 'https://artifacts.elastic.co/GPG-KEY-elasticsearch'
# API credentials # API credentials
wazuh_api_credentials: wazuh_api_credentials:

View File

@ -10,13 +10,13 @@
- name: Debian/Ubuntu | Add Elasticsearch GPG key. - name: Debian/Ubuntu | Add Elasticsearch GPG key.
apt_key: apt_key:
url: "https://artifacts.elastic.co/GPG-KEY-elasticsearch" url: "{{ elasticrepo.gpg }}"
id: 46095ACC8548582C1A2699A9D27D666CD88E42B4 id: 46095ACC8548582C1A2699A9D27D666CD88E42B4
state: present state: present
- name: Debian/Ubuntu | Install Elastic repo - name: Debian/Ubuntu | Install Elastic repo
apt_repository: apt_repository:
repo: "deb {{ elasticrepo_server }} stable main" repo: "deb {{ elasticrepo.apt }} stable main"
state: present state: present
filename: 'elastic_repo_7' filename: 'elastic_repo_7'
update_cache: true update_cache: true

View File

@ -1,6 +1,6 @@
--- ---
- name: Debian/Ubuntu | Removing Elasticsearch repository - name: Debian/Ubuntu | Removing Elasticsearch repository
apt_repository: apt_repository:
repo: deb https://artifacts.elastic.co/packages/7.x/apt stable main repo: "deb {{ elasticrepo.apt }} stable main"
state: absent state: absent
changed_when: false changed_when: false

View File

@ -1,6 +1,6 @@
--- ---
- name: Remove Elasticsearch repository (and clean up left-over metadata) - name: Remove Elasticsearch repository (and clean up left-over metadata)
yum_repository: yum_repository:
name: elastic_repo name: elastic_repo_7
state: absent state: absent
changed_when: false changed_when: false

View File

@ -3,8 +3,8 @@
yum_repository: yum_repository:
name: elastic_repo_7 name: elastic_repo_7
description: Elastic repository for 7.x packages description: Elastic repository for 7.x packages
baseurl: https://artifacts.elastic.co/packages/7.x/yum baseurl: "{{ elasticrepo.yum }}"
gpgkey: https://artifacts.elastic.co/GPG-KEY-elasticsearch gpgkey: "{{ elasticrepo.gpg }}"
gpgcheck: true gpgcheck: true
changed_when: false changed_when: false

View File

@ -49,5 +49,7 @@ master_certs_path: /es_certs
generate_CA: true generate_CA: true
ca_cert_name: "" ca_cert_name: ""
elasticrepo_gpg_keyserver: pool.sks-keyservers.net elasticrepo:
elasticrepo_server: https://artifacts.elastic.co/packages/7.x/apt apt: 'https://artifacts.elastic.co/packages/7.x/apt'
yum: 'https://artifacts.elastic.co/packages/7.x/yum'
gpg: 'https://artifacts.elastic.co/GPG-KEY-elasticsearch'

View File

@ -10,13 +10,13 @@
- name: Debian/Ubuntu | Add Elasticsearch GPG key. - name: Debian/Ubuntu | Add Elasticsearch GPG key.
apt_key: apt_key:
url: "https://artifacts.elastic.co/GPG-KEY-elasticsearch" url: "{{ elasticrepo.gpg }}"
id: 46095ACC8548582C1A2699A9D27D666CD88E42B4 id: 46095ACC8548582C1A2699A9D27D666CD88E42B4
state: present state: present
- name: Debian/Ubuntu | Add Filebeat repository. - name: Debian/Ubuntu | Add Filebeat repository.
apt_repository: apt_repository:
repo: "deb {{ elasticrepo_server }} stable main" repo: "deb {{ elasticrepo.apt }} stable main"
state: present state: present
update_cache: true update_cache: true
changed_when: false changed_when: false

View File

@ -1,6 +1,6 @@
--- ---
- name: Debian/Ubuntu | Remove Filebeat repository (and clean up left-over metadata) - name: Debian/Ubuntu | Remove Filebeat repository (and clean up left-over metadata)
apt_repository: apt_repository:
repo: deb https://artifacts.elastic.co/packages/7.x/apt stable main repo: "deb {{ elasticrepo.apt }} stable main"
state: absent state: absent
changed_when: false changed_when: false

View File

@ -1,6 +1,6 @@
--- ---
- name: RedHat/CentOS/Fedora | Remove Filebeat repository (and clean up left-over metadata) - name: RedHat/CentOS/Fedora | Remove Filebeat repository (and clean up left-over metadata)
yum_repository: yum_repository:
name: elastic_repo name: elastic_repo_7
state: absent state: absent
changed_when: false changed_when: false

View File

@ -1,9 +1,9 @@
--- ---
- name: RedHat/CentOS/Fedora/Amazon Linux | Install Filebeats repo - name: RedHat/CentOS/Fedora/Amazon Linux | Install Filebeats repo
yum_repository: yum_repository:
name: elastic_repo name: elastic_repo_7
description: Elastic repository for 6.x packages description: Elastic repository for 7.x packages
baseurl: https://artifacts.elastic.co/packages/7.x/yum baseurl: "{{ elasticrepo.yum }}"
gpgkey: https://artifacts.elastic.co/GPG-KEY-elasticsearch gpgkey: "{{ elasticrepo.gpg }}"
gpgcheck: true gpgcheck: true
changed_when: false changed_when: false