Skip to content
/ doll Public

Simple glue code that can be used to send arbitrary commands to nodes - especially to puppet agents

Notifications You must be signed in to change notification settings

leflamm/doll

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

doll

Simple glue code that can be used to send arbitrary commands to nodes. Nodes can be added manually or retrieved from the list of puppet agents known to a puppet master. It adds the functionality to filter by hostname patterns or by facter facts as well as to ignore certain hosts.

The original motivation was to have a simple tool that can trigger puppet agent runs on a specific subset of all puppet agents.

setup

Redefine variables in conf/doll.cfg according to your environment. You'll need password-less (pubkey auth) access as $PUPPETUSER on $PUPPETMASTER and password-less access as $REMOTEUSER on managed agents. You'll need parallel-ssh installed as well. There's a very basic check you can run afterwards.

$ doll check
/usr/bin/parallel-ssh
3.5.1
 All tests passed.

usage

add nodes

Load all puppet agents known to the configured puppet master in conf/doll.cfg .

$ doll load-puppet-agents

Or simply add nodes manually.

$ doll add super.special

Reset list of nodes.

$ doll clear

list all nodes

View all known nodes.

$ doll list

filter nodes

Filter hostnames using regular expressions,

$ doll filter .*dev 

or regarding certain facter values. You could also allow multiple legal values.

$ doll factfilter osfamily RedHat
$ doll factfilter processorcount 1 2 4

Every filter action alters the doll list permanently until it gets either cleared oder loaded again.

trigger actions

Trigger a puppet onetime puppet agent run on all nodes in the list,

$ doll trigger-puppet 

or run an arbitrary command on each node, like restarting a service.

$ doll run <CMD>

display puppet information

Show the last puppet run's summary for each node.

$ doll puppet-summary

Show the puppet agent version on each node.

$ doll puppet-version

ignore nodes

Permanently add hostname (or regular expression) to ignore list.

$ doll ignore <PATTERN>

Show ignored nodes.

$ doll list-ignored

Reset ignore list.

$ doll clear-ignored

About

Simple glue code that can be used to send arbitrary commands to nodes - especially to puppet agents

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages