Skip to content

Commit ef9ead5

Browse files
authored
Merge pull request elastic#173 from jakommo/master
Remove old http repo on debian/ubuntu and use https one.
2 parents 38354cb + adbccc2 commit ef9ead5

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

defaults/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ es_version_lock: false
55
es_use_repository: true
66
es_apt_key: "https://packages.elasticsearch.org/GPG-KEY-elasticsearch"
77
es_apt_url: "deb https://packages.elastic.co/elasticsearch/{{ es_major_version }}/debian stable main"
8+
es_apt_url_old: "deb http://packages.elastic.co/elasticsearch/{{ es_major_version }}/debian stable main"
89
es_start_service: true
910
es_java_install: true
1011
update_java: false

tasks/elasticsearch-Debian.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@
1414
when: es_use_repository and es_apt_key
1515

1616
- name: Debian - Add elasticsearch repository
17-
apt_repository: repo="{{ es_apt_url }}" state=present
17+
apt_repository: repo={{ item.repo }} state={{ item.state}}
18+
with_items:
19+
- { repo: "{{ es_apt_url_old }}", state: "absent" }
20+
- { repo: "{{ es_apt_url }}", state: "present" }
1821
when: es_use_repository
1922

2023
- name: Debian - Include versionlock

0 commit comments

Comments
 (0)