mirror of
https://github.com/aljazceru/ansible-elasticsearch.git
synced 2025-12-18 09:34:20 +01:00
Added functionality to hold or lock a deb/rpm package to currently installed version if es_version_lock is set to true. Closes #11
This commit is contained in:
3
tasks/elasticsearch-Debian-version-lock.yml
Normal file
3
tasks/elasticsearch-Debian-version-lock.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
---
|
||||
- name: Debian - hold elasticsearch version
|
||||
command: apt-mark hold elasticsearch
|
||||
6
tasks/elasticsearch-RedHat-version-lock.yml
Normal file
6
tasks/elasticsearch-RedHat-version-lock.yml
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
- name: RedHat - install yum-version-lock
|
||||
yum: name=yum-plugin-versionlock state=present update_cache=yes
|
||||
- name: RedHat - lock elasticsearch version
|
||||
command: yum versionlock add elasticsearch
|
||||
|
||||
10
tasks/elasticsearch-version-lock.yml
Normal file
10
tasks/elasticsearch-version-lock.yml
Normal file
@@ -0,0 +1,10 @@
|
||||
---
|
||||
# Trigger Debian section
|
||||
- name: Include Debian specific Elasticsearch
|
||||
include: elasticsearch-Debian-version-lock.yml
|
||||
when: ansible_os_family == 'Debian'
|
||||
|
||||
# Trigger Redhat section
|
||||
- name: Include RedHat specific Elasticsearch
|
||||
include: elasticsearch-RedHat-version-lock.yml
|
||||
when: ansible_os_family == 'RedHat'
|
||||
Reference in New Issue
Block a user