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:
Jakob Reiter 2015-07-07 15:11:21 +02:00
parent 2054b0d8ac
commit f37fa15382
3 changed files with 19 additions and 0 deletions

View file

@ -0,0 +1,3 @@
---
- name: Debian - hold elasticsearch version
command: apt-mark hold elasticsearch

View 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

View 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'