Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install ansible-modules-extras?

Tags:

ansible

I've installed ansible via the ubuntu apt package ansible, I am trying to use the npm module which is an extras module, which is provided only in the ansible-modules-extras Github repository.

How do I install ansible-modules-extras?


Looking at where files were installed as part of the ansible apt package, I would guess I have to merge some of the source codes folders to like /usr/share/ansible or somewhere under /usr/lib/python2.7/dist-packages/ansible.


I ask this as I get this error from the Ansible output:

msg: Failed to find required executable npm
like image 734
ThorSummoner Avatar asked Mar 09 '15 21:03

ThorSummoner


People also ask

How do I download and install Ansible modules?

The quickest way is to simply have a folder called library/ in the same folder as your playbook. Inside this folder, place the python script for the Ansible Module. You should now have a corresponding task available to your playbook.

How do I install Ansible packages?

To begin, choose the package manager on your local computer. For instance, if you're going to write your Ansible instructions (a "playbook," as it's called in Ansible) on a laptop running Fedora, start with the dnf module. If you're writing on Elementary OS, use the apt module, and so on.

Where do I put Ansible modules?

ansible/plugins/modules/ /usr/share/ansible/plugins/modules/


1 Answers

Ansible extras are included in the Ubuntu ansible apt package.

The target machine must have npm installed, apt package npm, can be installed like so via Ansible:

tasks:
- name: install npm
  apt:  pkg=npm state=present
like image 189
ThorSummoner Avatar answered Sep 30 '22 20:09

ThorSummoner