File tree Expand file tree Collapse file tree 9 files changed +37
-22
lines changed Expand file tree Collapse file tree 9 files changed +37
-22
lines changed Original file line number Diff line number Diff line change @@ -8,9 +8,9 @@ The role adds Elastic repositories to the package manager. It's main use is in c
8
8
Requirements
9
9
------------
10
10
11
- * You need ` gpg ` to be installed because packages / repositories are digitally signed and verified.
11
+ * You need ` gpg ` to be installed because packages / repositories are digitally signed and verified (Will be installed as part of the role) .
12
12
* Debian and Ubuntu hosts need to have ` apt-transport-https ` installed to deal with Elastics repositories.
13
- * Ubuntu hosts also need to have ` gpg-agent ` installed.
13
+ * Ubuntu hosts also need to have ` gpg-agent ` installed (Will be installed as part of the role) .
14
14
* For SuSE hosts you need the Ansible collection ` community.general ` on your Ansible controller.
15
15
16
16
Role Variables
Original file line number Diff line number Diff line change 1
1
---
2
- - name : Ensure gpg exists, for signing keys
3
- ansible.builtin.apt :
4
- name :
5
- - gpg
6
- - gpg-agent
7
- state : present
8
-
9
2
- name : Ensure Elastic Stack key is removed (Debian legacy format)
10
3
ansible.builtin.apt_key :
11
4
url : " {{ elasticstack_repo_key }}"
Original file line number Diff line number Diff line change 5
5
name : netways.elasticstack.elasticstack
6
6
when : not hostvars[inventory_hostname]._elasticstack_role_imported | default(false)
7
7
8
+ - name : Include OS specific vars
9
+ ansible.builtin.include_vars : " {{ lookup('first_found', params) }}"
10
+ vars :
11
+ params :
12
+ files :
13
+ - " {{ ansible_os_family }}-{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml"
14
+ - " {{ ansible_os_family }}-{{ ansible_distribution_major_version }}.yml"
15
+ - " {{ ansible_os_family }}-{{ ansible_distribution }}.yml"
16
+ - " {{ ansible_os_family }}-{{ ansible_lsb.id if ansible_lsb.id is defined else ansible_distribution }}.yml"
17
+ - " {{ ansible_os_family }}.yml"
18
+ - default.yml
19
+ paths :
20
+ - " {{ role_path }}/vars"
21
+
22
+ - name : Install package dependencies
23
+ ansible.builtin.package :
24
+ name : " {{ item }}"
25
+ state : present
26
+ loop : " {{ repos_packages }}"
27
+ when :
28
+ - repos_packages is defined
29
+ - repos_packages | length > 0
30
+
8
31
- name : Import RedHat tasks
9
32
ansible.builtin.import_tasks : redhat.yml
10
33
when : ansible_os_family == 'RedHat'
Original file line number Diff line number Diff line change 1
1
---
2
-
3
2
# See https://github.com/elastic/elasticsearch/issues/85876
4
3
# for more information why this is needed
5
-
6
- - name : Ensure gpg exists, for signing keys
7
- ansible.builtin.package :
8
- name : gnupg
9
- state : present
10
-
11
4
- name : Workaround for EL > 8
12
5
when :
13
6
- ansible_distribution_major_version >= "9"
Original file line number Diff line number Diff line change 1
1
---
2
-
3
- - name : Ensure gpg exists, for signing keys
4
- community.general.zypper :
5
- name : gpg2
6
- state : present
7
-
8
2
- name : Ensure Elastic Stack yum repository is configured (SuSE)
9
3
community.general.zypper_repository :
10
4
name : elastic-{{ elasticstack_release }}.x
Original file line number Diff line number Diff line change
1
+ ---
2
+ repos_packages :
3
+ - gpg
4
+ - gpg-agent
5
+ - apt-transport-https
Original file line number Diff line number Diff line change
1
+ ---
2
+ repos_packages :
3
+ - gnupg
Original file line number Diff line number Diff line change
1
+ ---
2
+ repos_packages :
3
+ - gpg2
Original file line number Diff line number Diff line change
1
+ ---
You can’t perform that action at this time.
0 commit comments