8000 GitHub - cabify/linode-inventory: Ansible Inventory plugin for use with Linode
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Feb 19, 2024. It is now read-only.

cabify/linode-inventory

 
 

Repository files navigation

linode-inventory

Ansible dynamic inventory plugin for use with Linode.

The Ansible repository already contains an Linode dynamic inventory plugin, which may be useful to you.

This plugin differs from the 'official' one in the following ways:

  • Allows filtering of hosts based on the Linode 'Display Group'. This can help ensure production and staging machines aren't mixed. Configured in the linode-inventory.ini with the display-group key.

  • For each host, sets the ansible_ssh_host variable using the public ip. This eliminates the need to reference hosts by their ip, or maintain your /etc/hosts file. You can then create another inventory file in the same directory, and reference the hosts by their Linode label.

  • Returns host variables in the _meta top level element, reducing the number of api calls to Linode and speeding up the provisioning process. This eliminates the need to call the executable with --host for each host.

  • Uses Linode api batch requests. Only makes 2 requests to the api when called with --list.

  • No external dependencies.

  • Creates less variables per host, but adding more would be trival. Open a pull-request if you need one defined.

See Developing Dynamic Inventory Sources for more information.

Download

Grab the latest release from Releases

Usage

  • Download the appropriate package from releases.

  • Place the executable inside your ansible directory, alongside other inventory files in a directory or wherever you like.

  • Create a linode-inventory.ini file with your Linode API key in the same directory as the executable. See the inlcluded example ini file linode-inventory.example.ini.

  • Test the output

./linode-inventory --list

Changelog

0.1.2 - 2015 March 27th

  • Fixed bug in linode library with max server list limit

0.1.1 - 2015 March 5th

  • Always use first private or public address identified.

0.1.0

  • First public release.

About

Ansible Inventory plugin for use with Linode

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 75.8%
  • Makefile 24.2%
0