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 11---
22# defaults file for elastic-repos
3+ elasticstack_repo_key : https://artifacts.elastic.co/GPG-KEY-elasticsearch
34elasticstack_release : 8
45elasticstack_full_stack : true
56elasticstack_variant : elastic
Original file line number Diff line number Diff line change 66 - gpg-agent
77 state : present
88
9- - name : Ensure Elastic Stack key is available (Debian)
9+ - name : Ensure Elastic Stack key is removed (Debian legacy format )
1010 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"
1329
1430- name : Ensure Elastic Stack apt repository is configured (Debian)
1531 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
1733 state : present
34+ filename : elasticstack
1835 when : elasticstack_variant == "elastic"
1936
2037- name : Ensure Elastic Stack OSS apt repository is configured (Debian)
2138 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
2340 state : present
41+ filename : elasticstack
2442 when : elasticstack_variant == "oss"
Original file line number Diff line number Diff line change 3636
3737- name : Ensure Elastic repository key is available (RedHat)
3838 ansible.builtin.rpm_key :
39- key : https://artifacts.elastic.co/GPG-KEY-elasticsearch
39+ key : " {{ elasticstack_repo_key }} "
4040 state : present
4141
4242- name : Ensure Elastic Stack yum repository is configured (RedHat)
4646 file : elastic-release
4747 baseurl : https://artifacts.elastic.co/packages/{{ elasticstack_release }}.x/yum
4848 gpgcheck : yes
49- gpgkey : https://artifacts.elastic.co/GPG-KEY-elasticsearch
49+ gpgkey : " {{ elasticstack_repo_key }} "
5050 enabled : " {{ elasticstack_enable_repos | bool }}"
5151 when : elasticstack_variant == "elastic"
5252
5757 file : elastic-oss-release
5858 baseurl : https://artifacts.elastic.co/packages/oss-{{ elasticstack_release }}.x/yum
5959 gpgcheck : yes
60- gpgkey : https://artifacts.elastic.co/GPG-KEY-elasticsearch
60+ gpgkey : " {{ elasticstack_repo_key }} "
6161 enabled : " {{ elasticstack_enable_repos | bool }}"
6262 when : elasticstack_variant == "oss"
You can’t perform that action at this time.
0 commit comments