0

I am using a 3rd party Ansible role that requires some python libraries to be present on the host running my playbook.

I expect Ansible Galaxy to actually install those dependencies for me, unfortunately, it's not the case since AG only install roles dependencies. So I have to manually take care of that.

I am looking for an automated approach, do you have any elegant way to do it?

Nicolas Barbé
  • 604
  • 7
  • 12
  • You mean to extract needed library names from role's code? – Konstantin Suvorov Aug 04 '16 at 12:44
  • Yes, dependencies from the role's code. I am speaking about this role: https://github.com/ns1/ns1-ansible-modules (see installation instructions) but I have encountered this need with other 3rd party roles. – Nicolas Barbé Aug 04 '16 at 13:13

1 Answers1

2

There is no elegant way of doing that (at least one that I'm aware of). Many Ansible modules require extra packages to be installed on the host that executes the task. It's common to hit those problems when first executing a play or task.

So I guess the most elegant way would be to create a pull request for the Galaxy role to add those dependencies to the play with an extra task.

Henrik Pingel
  • 3,083
  • 1
  • 19
  • 27