Utility to extract IPs from a service defined in inventory.json
  • Go 82.3%
  • Makefile 17.7%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-09-11 18:43:45 +01:00
man add support for new inventory.json format 2020-11-06 13:31:37 -08:00
go.mod update module path and urls 2026-09-11 18:43:45 +01:00
go.sum rename module to inv2ips, remove up dependency 2020-07-12 07:24:26 -07:00
LICENSE replace isc license with agpl 2026-09-11 18:19:10 +01:00
main.go add support for new inventory.json format 2020-11-06 13:31:37 -08:00
Makefile update module path and urls 2026-09-11 18:43:45 +01:00
README.md update module path and urls 2026-09-11 18:43:45 +01:00

inv2ips(1)

inv2ips(1) is a small utility that outputs CSV IP addresses for a given service name.

Install

$ git clone ssh://git@git.evantann.com:2222/egtann/inv2ips.git
$ sudo make install

Check the man pages for inv2ips(1) and inventory.json(5) for detailed usage information and examples.

Usage

Given an inventory.json file that looks like this:

{
	"my-app": ["10.128.0.1", "10.128.0.2"]
}
$ inv2ips my-app
10.128.0.1,10.128.0.2

This may be useful to dynamically update addresses in environment files or flags using their service names, such as appending them to a config file during deploy:

$ echo "IPS=$(inv2ips -p 3000 inventory)" >> config.env

It may also be useful when combined with Up to deploy services or environments by name:

$ up -t $(inv2ips production) deploy