Ansible not completely installing Elasticsearch RPM package via YUM

This has me tearing my hair out, only because I don’t know how to go about debugging this.

Versions:

ansible --version

ansible 2.2.1.0
config file = /etc/ansible/ansible.cfg
configured module search path = Default w/o overrides

(This is current version in EPEL)

Trying to install elasticsearch-2.4.4-1.noarch from the graylog repo. Our system is disconnected from the Internet, so we’ve created our own yum repositories that are properly configured on the clients.

When I log onto my graylog server and do a “yum install elasticsearch”, the package installs correctly. However, I want to run a simple playbook against the server that does the following:

  • name: Install ElasticSearch
    yum:
    name: elasticsearch
    state: present
    update_cache: yes

When I run this playbook, it looks as though the package installs, but checking the server, it doesn’t install a few of the files in the package:

rpm -qa elasticsearch

elasticsearch-2.4.4-1.noarch

rpm -V elasticsearch

missing c /etc/elasticsearch/elasticsearch.yml
missing c /etc/elasticsearch/logging.yml
missing c /etc/init.d/elasticsearch
missing c /etc/sysconfig/elasticsearch
missing c /usr/lib/systemd/system/elasticsearch.service

It’s a challenge to me to figure out whether the problem is with Ansible or with the package itself, but I’m not sure what Ansible would be doing different when it runs the yum installation than when it’s installed manually.

Any help in debugging this would be greatly appreciated.

Tom Albrecht III

I'd start by going through /var/log/yum.log, maybe something went boom
and was logged there?

Thanks… figured it out. I was using the ansible-elasticsearch playbook (which I should have noted) and didn’t realize that later in the playbook, and it made modifications to the systemd files. Don’t know if I like this behavior, but that was the cause.