-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated to support both RPM and YUM based distros. #1
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
- name: Import Elasticsearch key | ||
apt_key: url=https://packages.elastic.co/GPG-KEY-elasticsearch state=present | ||
- name: Add Elasticsearch Repo | ||
apt_repository: repo="deb http://packages.elastic.co/elasticsearch/2.x/debian stable main" state=present | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,10 @@ | ||
--- | ||
- name: Add apt-repo for Debian/Ubuntu | ||
include: add-apt-repo.yaml | ||
when: ansible_pkg_mgr == "apt" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please do not create additional task files. Please insert the single task in here. |
||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please retain this distro check. Please just add check for Debian. |
||
- name: Test distribution | ||
assert: | ||
that: ansible_os_family == "RedHat" | ||
|
||
- name: Install elasticsearch package for RedHat | ||
yum: | ||
name: "{{ elasticsearch_pkg }}" | ||
state: present | ||
- name: Install elasticsearch package | ||
action: "{{ ansible_pkg_mgr }} name={{ elasticsearch_pkg }} state=present" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please do not use in-line YAML. Also use of |
||
notify: | ||
- Restart elasticsearch | ||
tags: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove
.x
.