File tree Expand file tree Collapse file tree 3 files changed +27
-8
lines changed Expand file tree Collapse file tree 3 files changed +27
-8
lines changed Original file line number Diff line number Diff line change 1
1
---
2
2
# defaults file for elastic-repos
3
+ elasticstack_repo_key : https://artifacts.elastic.co/GPG-KEY-elasticsearch
3
4
elasticstack_release : 8
4
5
elasticstack_full_stack : true
5
6
elasticstack_variant : elastic
Original file line number Diff line number Diff line change 6
6
- gpg-agent
7
7
state : present
8
8
9
- - name : Ensure Elastic Stack key is available (Debian)
9
+ - name : Ensure Elastic Stack key is removed (Debian legacy format )
10
10
ansible.builtin.apt_key :
11
- url : https://artifacts.elastic.co/GPG-KEY-elasticsearch
12
- state : present
11
+ url : " {{ elasticstack_repo_key }}"
12
+ state : absent
13
+
14
+ - name : Ensure Elastic Stack key is available (Debian)
15
+ ansible.builtin.get_url :
16
+ url : " {{ elasticstack_repo_key }}"
17
+ dest : /usr/share/keyrings/elasticsearch.asc
18
+ mode : " 0644"
19
+
20
+ - name : Ensure Elastic Stack apt repo is absent (Debian legacy format)
21
+ ansible.builtin.file :
22
+ path : /etc/apt/sources.list.d/artifacts_elastic_co_packages_{{ item }}_x_apt.list
23
+ state : absent
24
+ with_items :
25
+ - " 7"
26
+ - " oss-7"
27
+ - " 8"
28
+ - " oss-8"
13
29
14
30
- name : Ensure Elastic Stack apt repository is configured (Debian)
15
31
ansible.builtin.apt_repository :
16
- repo : deb https://artifacts.elastic.co/packages/{{ elasticstack_release }}.x/apt stable main
32
+ repo : deb [signed-by=/usr/share/keyrings/elasticsearch.asc] https://artifacts.elastic.co/packages/{{ elasticstack_release }}.x/apt stable main
17
33
state : present
34
+ filename : elasticstack
18
35
when : elasticstack_variant == "elastic"
19
36
20
37
- name : Ensure Elastic Stack OSS apt repository is configured (Debian)
21
38
ansible.builtin.apt_repository :
22
- repo : deb https://artifacts.elastic.co/packages/oss-{{ elasticstack_release }}.x/apt stable main
39
+ repo : deb [signed-by=/usr/share/keyrings/elasticsearch.asc] https://artifacts.elastic.co/packages/oss-{{ elasticstack_release }}.x/apt stable main
23
40
state : present
41
+ filename : elasticstack
24
42
when : elasticstack_variant == "oss"
Original file line number Diff line number Diff line change 36
36
37
37
- name : Ensure Elastic repository key is available (RedHat)
38
38
ansible.builtin.rpm_key :
39
- key : https://artifacts.elastic.co/GPG-KEY-elasticsearch
39
+ key : " {{ elasticstack_repo_key }} "
40
40
state : present
41
41
42
42
- name : Ensure Elastic Stack yum repository is configured (RedHat)
46
46
file : elastic-release
47
47
baseurl : https://artifacts.elastic.co/packages/{{ elasticstack_release }}.x/yum
48
48
gpgcheck : yes
49
- gpgkey : https://artifacts.elastic.co/GPG-KEY-elasticsearch
49
+ gpgkey : " {{ elasticstack_repo_key }} "
50
50
enabled : " {{ elasticstack_enable_repos | bool }}"
51
51
when : elasticstack_variant == "elastic"
52
52
57
57
file : elastic-oss-release
58
58
baseurl : https://artifacts.elastic.co/packages/oss-{{ elasticstack_release }}.x/yum
59
59
gpgcheck : yes
60
- gpgkey : https://artifacts.elastic.co/GPG-KEY-elasticsearch
60
+ gpgkey : " {{ elasticstack_repo_key }} "
61
61
enabled : " {{ elasticstack_enable_repos | bool }}"
62
62
when : elasticstack_variant == "oss"
You can’t perform that action at this time.
0 commit comments