Remove the other Elasticsearch repo when switching versions
This commit is contained in:
parent
c2e51f8ecf
commit
486717bc6f
2 changed files with 12 additions and 1 deletions
|
|
@ -15,6 +15,7 @@
|
||||||
es_repo_name: "{{ es_major_version }}"
|
es_repo_name: "{{ es_major_version }}"
|
||||||
es_xpack_users_command: "elasticsearch-users"
|
es_xpack_users_command: "elasticsearch-users"
|
||||||
es_other_package_name: "elasticsearch-oss"
|
es_other_package_name: "elasticsearch-oss"
|
||||||
|
es_other_repo_name: "{{ 'oss-' + es_major_version }}"
|
||||||
|
|
||||||
- name: Detect if es_version is before X-Pack was open and included
|
- name: Detect if es_version is before X-Pack was open and included
|
||||||
set_fact:
|
set_fact:
|
||||||
|
|
@ -33,6 +34,7 @@
|
||||||
- name: Use the oss repo and package if xpack is not being used
|
- name: Use the oss repo and package if xpack is not being used
|
||||||
set_fact:
|
set_fact:
|
||||||
es_repo_name: "{{ 'oss-' + es_major_version }}"
|
es_repo_name: "{{ 'oss-' + es_major_version }}"
|
||||||
|
es_other_repo_name: "{{ es_major_version }}"
|
||||||
es_package_name: "elasticsearch-oss"
|
es_package_name: "elasticsearch-oss"
|
||||||
es_other_package_name: "elasticsearch"
|
es_other_package_name: "elasticsearch"
|
||||||
when:
|
when:
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,16 @@
|
||||||
|
|
||||||
- name: RedHat - add Elasticsearch repo
|
- name: RedHat - add Elasticsearch repo
|
||||||
become: yes
|
become: yes
|
||||||
template: src=elasticsearch.repo dest=/etc/yum.repos.d/elasticsearch-{{ es_repo_name }}.repo
|
template:
|
||||||
|
src: 'elasticsearch.repo'
|
||||||
|
dest: '/etc/yum.repos.d/elasticsearch-{{ es_repo_name }}.repo'
|
||||||
|
when: es_use_repository
|
||||||
|
|
||||||
|
- name: RedHat - remove unused Elasticsearch repo
|
||||||
|
become: yes
|
||||||
|
template:
|
||||||
|
src: 'elasticsearch.repo'
|
||||||
|
dest: '/etc/yum.repos.d/elasticsearch-{{ es_other_repo_name }}.repo'
|
||||||
when: es_use_repository
|
when: es_use_repository
|
||||||
|
|
||||||
- name: RedHat - include versionlock
|
- name: RedHat - include versionlock
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue