Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to download and install ansible modules?

Tags:

ansible

I have found this DNSimple ansible module:

http://docs.ansible.com/ansible/dnsimple_module.html

but can not find anywhere on that page to download and install it? How do I go about downloading and installing ansible modules like this. Thanks.

like image 674
Zuriar Avatar asked Mar 16 '17 14:03

Zuriar


2 Answers

The accepted answer solved the questioner's problem but didn't address the broader scope of the question.

How to install an Ansible module? The documentation is currently vague as to how to achieve this simple requirement!

An excellent general guide to writing modules (I've no connection to the author) can be found here.

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.

If you want to share your module across multiple projects, then you can add an entry to /etc/ansible/ansible.cfg pointing to a shared library location, eg:

library        = /usr/share/ansible/library
like image 95
Dick Chesterwood Avatar answered Nov 19 '22 10:11

Dick Chesterwood


The module itself is part of ansible since version 1.6 (as stated here). To use it, you need to have dnsimple on your host machine (also stated in the above description). Install it with sudo pip install dnsimple

like image 3
13dimitar Avatar answered Nov 19 '22 11:11

13dimitar