-
Notifications
You must be signed in to change notification settings - Fork 1
Hosttag is a client for tagging hostnames into classes, storing the mappings in a redis datastore.
License
gavincarr/hosttag_rb
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Introduction ------------ Hosttag is a client for tagging hostnames into groups or classes, storing the mappings in a redis datastore. It requires the 'redis' rubygem. Hosttag assumes your redis server is found on a server called 'hosttag' on the default redis port (6379). You can either setup 'hosttag' as a hostname alias in a local hosts file, or specify an alternative host to use in a HOSTTAG_SERVER environment variable, or explicitly via a -s/--server <hostname> argument. Similarly, an alternate port can be specified using a HOSTTAG_PORT environment variable, or a -p/--port <port> command line argument. Basic Usage ----------- # Set some tags (-T says assume anything you don't know is a tag) $ htset -T zeus dell centos centos5 server $ htset -T minerva dell centos centos6 laptop $ htset -T hermes hp ubuntu lucid desktop $ htset -T athena hp ubuntu maverick server # Queries $ ht dell minerva zeus $ ht ubuntu hermes athena $ ht -o hp dell # -o/--or ORs arguments hermes minerva zeus $ ht -a ubuntu server # -a/--and ANDs arguments athena $ ht -o de* # tags and hosts may include globs (*, ?, [M-N]) zeus minerva hermes $ ht -A # all hosts athena hermes minerva zeus $ ht -T # all tags centos centos5 centos6 dell desktop hp laptop lucid maverick server Security -------- A warning on security: basically, there isn't any. Anyone who can get write to your redis server can write, rewrite, and delete all your hosttags. So you should only use hosttag on a trusted network. Redis supports a password-ed mode, and it might make sense to use that via a config file or something, so you could at least restrict usage via file permissions (although traffic would still be in the clear, I believe). For now, though, there's no security. Installation ------------ To install from source, unpack the tarball and run 'rake install' (requires rubygems and rake). You can set GEM_HOME to an alternate install directory (e.g. ~/.gem) if you want to install somewhere other than your gem default. RPMs are available for CentOS/RHEL {5,6} from the Open Fusion repository: http://www.openfusion.net/linux/openfusion_rpm_repository Author ------ Gavin Carr <gavin@openfusion.com.au>, http://www.openfusion.net/ Copyright 2010-2011 Gavin Carr. Licence ------- This software is free software, licensed under the GNU Public License v3 or any later version.
About
Hosttag is a client for tagging hostnames into classes, storing the mappings in a redis datastore.
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published