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:
parent
38354cb0bb
commit
adbccc215d
2 changed files with 5 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue