triton-ansible-inventory

1.1.4 • Public • Published

triton-ansible-inventory

This is an Ansible inventory plugin for Triton.

Installing

You can either git clone this repo, or npm install it to your ansible directory.

git clone https://github.com/joyent/triton-ansible-inventory

or

npm install triton-ansible-inventory

Or if you prefer, you can just download the triton-ansible-inventory.js script right out of this repo and put it in your ansible directory.

Configuration

By default, the triton-ansible-inventory plug-in will use your existing node-triton configuration. This means it will use your currently set triton profile, and you need to use triton profile set [name] to change profiles. If your profile is env, then TRITON_* or SDC_* environment variables will be used.

Alternatively, you can have a .triton config directory local to your ansible directory with a specific profile that you do not wish to change. The variable ANSIBLE_TRITON_KEY_ID can be used to override the key specified in the profile (e.g., for a repo shared by multiple users were each user has a different key).

Usage

You can either specify the inventory plugin on the command line, or configure it directly in your Ansible config.

Command Line Usage

Specify the inventory command with the -i flag. This example assumes you used npm to install this plugin

ansible-inventory -i node_modules/.bin/triton-ansible-inventory --list

Ansible Configuration

You can also add the plugin directly to your ansible config, thereby eliminating the need to use the -i flag.

[defaults]
inventory = node_modules/.bin/triton-ansible-inventory
ansible-inventory --list

Package Sidebar

Install

npm i triton-ansible-inventory

Weekly Downloads

0

Version

1.1.4

License

MPL-2.0

Unpacked Size

32.8 kB

Total Files

7

Last publish

Collaborators

  • bahamat