ansible-role-elasticsearch/tasks/elasticsearch-Debian.yml

41 lines
1.5 KiB
YAML
Raw Normal View History

2015-05-13 09:45:55 +02:00
---
2016-07-20 14:57:21 +01:00
- set_fact: force_install=no
- set_fact: force_install=yes
when: es_allow_downgrades
2016-10-27 10:38:33 +02:00
- name: Debian - Install apt-transport-https to support https APT downloads
apt: name=apt-transport-https state=present
when: es_use_repository
- name: Debian - Add Elasticsearch repository key
2016-08-30 12:30:54 +01:00
apt_key: url="{{ es_apt_key }}" state=present
when: es_use_repository and es_apt_key
2016-10-27 10:38:33 +02:00
- name: Debian - Add elasticsearch repository
2016-08-30 12:30:54 +01:00
apt_repository: repo="{{ es_apt_url }}" state=present
when: es_use_repository
2016-10-27 10:38:33 +02:00
- name: Debian - Include versionlock
include: elasticsearch-Debian-version-lock.yml
when: es_version_lock
- name: Debian - Ensure elasticsearch is installed
2016-07-20 14:57:21 +01:00
apt: name=elasticsearch{% if es_version is defined and es_version != "" %}={{ es_version }}{% endif %} state=present force={{force_install}} cache_valid_time=86400
when: es_use_repository
2016-05-25 19:24:58 +06:00
register: elasticsearch_install_from_repo
- name: Debian - Download elasticsearch from url
get_url: url={% if es_custom_package_url is defined %}{{ es_custom_package_url }}{% else %}{{ es_package_url }}-{{ es_version }}.deb{% endif %} dest=/tmp/elasticsearch-{{ es_version }}.deb validate_certs=no
when: not es_use_repository
- name: Debian - Ensure elasticsearch is installed from downloaded package
apt: deb=/tmp/elasticsearch-{{ es_version }}.deb
when: not es_use_repository
register: elasticsearch_install_from_package
# ansible uri module requires httplib2
2016-08-29 17:41:35 +01:00
- name: python-httplib2
2016-10-27 10:38:33 +02:00
apt: name=python-httplib2