inventory-dsigner

command module
v0.0.0-...-c890139 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 18, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

README

inventory-dsigner

(Ansible) inventory combinator tool for merging or splitting inventories.

install

go get codeberg.com/daemonna/inventory-dsigner

cd $GOPATH/src/codeberg.com/daemonna/inventory-dsigner ./rebuild.sh

openshift

oc new-app golang~https://codeberg.com/daemonna/inventory-dsigner.git

use

combine file inventories into single file

inventory-dsigner --inputfile="examples/inventory1.yml,examples/inventory2.yml" --outputfile="xxx.yml"

combine folders into single file

inventory-dsigner --inputfolder="inv1_dir,inv2_dir" --outputfile="alldirs.yml"

transform single file inventory into folder inventory

inventory-dsigner --inputfile="xxx.yml" --outputfolder="xxx_inventory"

Scenario

INFRASTRUCTURE team creates 10 different/separate environments (and their inventories) for several teams in company. They call them lab1 to lab10.

  • They want to assign lab1 and lab2 to Security team.
  • They want to assign lab3 to lab10 to development team.
  • They want Security team to maintain all log servers in lab1 to lab10.
  • They want security testers to be able pentest all webservers in lab1 to lab10.

Instead of giving them lab1..10 inventory, they will create combined inventories with meaningful names like security_dev_inventory or pentesting_lab. Combining these inventories by hand could be error prone and with huge inventories (100 of groups) could be almost impossible, not just regarding time but also regarding avoidance of errors/typos. Another things is that for example pentester team, should not have info about rest of infrastructure, therefor giving them all lab1 to lab10 inventories make it more confusing for them (too many IPs) and less secure for others (they know other hosts!).

Extras

inventory-dsigner can be also used to avoid duplicities in inventories.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Sample of encrypting and decrypting a whole file with crypto/aes.
Sample of encrypting and decrypting a whole file with crypto/aes.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL