ansible gem not installing dependencies

738 views
Skip to first unread message

J Soetanto

unread,
Oct 26, 2014, 7:57:58 PM10/26/14
to ansible...@googlegroups.com
Hi there,

I tried to install fluentd elasticsearch plugin using ansible gem, however for some reason the installation does not install the dependencies even though i explicitly set to install dependencies

Background:

Trying the following code result with success, however the td-agent service can't start because it is missing some dependencies

gem: name=fluent-plugin-elasticsearch state=present executable=/opt/td-agent/embedded/bin/fluent-gem include_dependencies=yes

When starting the service ,receive error

fluent/supervisor.rb:257:rescue in main_process: config error file="/etc/td-agent/td-agent.conf" error="Unknown output plugin 'elasticsearch'. Run 'gem search -rd fluent-plugin' to find plugins"

However if i execute it using standard command (below) , i don't encounter the problem

command: /opt/td-agent/embedded/bin/fluent-gem install fluent-plugin-elasticsearch

How do i know it is missing dependencies? When i see the gem list under td-agent directory (/opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/) no elasticsearch listed there when installing using "ansible gem" . if i try to install elasticsearch using "ansible gem" it will complain it is missing other fluentd plugins.

Is this problem with gem plugin ? or can anyone shed any light on this?

Thanks,

J Soetanto

unread,
Oct 26, 2014, 9:43:39 PM10/26/14
to ansible...@googlegroups.com
​Really weird, after tinkering i got it working by adding "user_install=no" . The gem executable is slightly different

gem
: name=fluent-plugin-elasticsearch state=present executable=/usr/sbin/td-agent-gem user_install=no

For some reason without user install option , i found that the gem was installed under root home directory. Shouldn't by default it install it system wide?

Michael DeHaan

unread,
Oct 30, 2014, 1:55:48 PM10/30/14
to ansible...@googlegroups.com
"For some reason without user install option , i found that the gem was installed under root home directory. Shouldn't by default it install it system wide?"

I would hope so, yes.

Perhaps this is something about that particular gem?



--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/b830f627-d468-488a-b7a7-bb9e201288c4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Kyle Tarplee

unread,
Jul 29, 2015, 11:59:00 AM7/29/15
to Ansible Project, mic...@ansible.com
I'm having the same issue with beanstalkd_view
gem: name=beanstalkd_view user_install=no include_dependencies=yes state=present

will not install dependencies of beanstalkd_view.
Ubuntu 14.04LTS and the ansible 1.9.2

Kyle Tarplee

unread,
Jul 29, 2015, 12:12:50 PM7/29/15
to Ansible Project, mic...@ansible.com, ktar...@gmail.com
I just figured it out.  The existence of /root/.gems that met the dependencies of beanstalkd_view is what caused the issue.  Gem thought the dependencies were met eventhough they were not when it was installing system wide in /var/lib/gems. I think the default for user_install should be false (system wide should be the default).  That is why I had packages installed in root's home directory to begin with.   Removing the directory /root/.gems solved the problem.
Reply all
Reply to author
Forward
0 new messages