diff --git a/tasks/elasticsearch-Debian-version-lock.yml b/tasks/elasticsearch-Debian-version-lock.yml index d9fdd698..4ca9b241 100644 --- a/tasks/elasticsearch-Debian-version-lock.yml +++ b/tasks/elasticsearch-Debian-version-lock.yml @@ -1,6 +1,6 @@ --- - name: Debian - hold elasticsearch version become: yes - command: apt-mark hold elasticsearch + command: "apt-mark hold {{ es_package_name }}" register: hold_elasticsearch_result - changed_when: "hold_elasticsearch_result.stdout != 'elasticsearch was already set on hold.'" + changed_when: "hold_elasticsearch_result.stdout != '{{ es_package_name }} was already set on hold.'" diff --git a/tasks/elasticsearch-RedHat-version-lock.yml b/tasks/elasticsearch-RedHat-version-lock.yml index b5711a2f..94059e31 100644 --- a/tasks/elasticsearch-RedHat-version-lock.yml +++ b/tasks/elasticsearch-RedHat-version-lock.yml @@ -4,4 +4,4 @@ yum: name=yum-plugin-versionlock state=present update_cache=yes - name: RedHat - lock elasticsearch version become: yes - shell: yum versionlock delete 0:elasticsearch* ; yum versionlock add elasticsearch{% if es_version is defined and es_version != "" %}-{{ es_version }}{% endif %} + shell: yum versionlock delete 0:elasticsearch* ; yum versionlock add {{ es_package_name }}{% if es_version is defined and es_version != "" %}-{{ es_version }}{% endif %}