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:
parent
2054b0d8ac
commit
f37fa15382
3 changed files with 19 additions and 0 deletions
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'
|
||||
Loading…
Add table
Add a link
Reference in a new issue