mirror of
https://github.com/aljazceru/ansible-elasticsearch.git
synced 2025-12-17 17:14:20 +01:00
Fix for the issue introduces with the change in https://github.com/elastic/ansible-elasticsearch/pull/170
Changed debian repo from http to https, but exisiting http repos (from earlier runs) would persist and lead to an duplicate entry warning in apt. This PR will remove the old http repo, if present.
This commit is contained in:
@@ -5,6 +5,7 @@ es_version_lock: false
|
||||
es_use_repository: true
|
||||
es_apt_key: "https://packages.elasticsearch.org/GPG-KEY-elasticsearch"
|
||||
es_apt_url: "deb https://packages.elastic.co/elasticsearch/{{ es_major_version }}/debian stable main"
|
||||
es_apt_url_old: "deb http://packages.elastic.co/elasticsearch/{{ es_major_version }}/debian stable main"
|
||||
es_start_service: true
|
||||
es_java_install: true
|
||||
update_java: false
|
||||
|
||||
@@ -14,7 +14,10 @@
|
||||
when: es_use_repository and es_apt_key
|
||||
|
||||
- name: Debian - Add elasticsearch repository
|
||||
apt_repository: repo="{{ es_apt_url }}" state=present
|
||||
apt_repository: repo={{ item.repo }} state={{ item.state}}
|
||||
with_items:
|
||||
- { repo: "{{ es_apt_url_old }}", state: "absent" }
|
||||
- { repo: "{{ es_apt_url }}", state: "present" }
|
||||
when: es_use_repository
|
||||
|
||||
- name: Debian - Include versionlock
|
||||
|
||||
Reference in New Issue
Block a user