tdelphi / puppet-rundeck

Puppet integration with RunDeck
Apache License 2.0
1 stars 0 forks source link

{Gem Version}[http://badge.fury.io/rb/puppet-rundeck-2013]

= puppet-rundeck-2013

Integrates Puppet with RunDeck.

Visiting the URL, for example localhost:8144, should return a list of all nodes on the Puppet master and populates the appropriate facts for use with RunDeck.

Note: Version 0.0.2 required stored configuration to be enabled. Later versions do not.

== Prerequisites

Requires:

== Installation

Install the gem:

$ sudo gem install puppet-rundeck-2013

== Usage

Run the puppet-rundeck binary. We've assumed you're running puppet-rundeck on the Puppet master host.

$ puppet-rundeck

Then browse to appropriate URL, by default localhost:8144

$ curl localhost:8144

A list of the current hosts and appropriate facts to configure them on RunDeck will be returned in XML.

For example:

  <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE project PUBLIC "-//DTO Labs Inc.//DTD Resources Document 1.0//EN" "project.dtd">
  <project>
    <node name="pelin.lovedthanlost.net"
    type="Node"
    description="pelin.lovedthanlost.net"
    osArch="Linux"
    osFamily="Linux"
    osName="Fedora"
    osVersion="14"
    tags="production"
    username="root"
    hostname="pelin.lovedthanlost.net"/>
  </project>

To use with RunDeck specify the target URL as the value of the project.resources.url option in the project.properties file for your project, for example:

project.resources.url = http://localhost:8144

You can also specify a required tag to filter the node list, to provide different project URLs based on the same puppet server and puppet-rundeck instance:

project.resources.url = http://localhost:8144/tag/production

You can also specify a required facts to filter the node list, to provide different project URLs based on the same puppet server and puppet-rundeck instance:

project.resources.url = http://localhost:8144/facts/timezone=UTC&uptime_days=0

In the version puppet-rundeck-2013 you can also pass configuration flags for puppet-rundeck.

Examples:

Add facts fqdn and ipaddress to list of tags, set SSH user to root and disable puppet-generated tags: curl http://127.0.0.1:8144/?add_facts=fqdn,ipaddress&user=root&use_tags=0

Add facts fqdn and ipaddress to list of tags, set SSH user to root and disable puppet-generated tags only for nodes with timezone = UTC and having days uptime=0: curl http://127.0.0.1:8144/facts/timezone=UTC&uptime_days=0?add_facts=fqdn,ipaddress&user=root&use_tags=0

You can specify some configuration options:

== Credits

Original concept heavily stolen from Adam Jacob's chef-rundeck gem

== Copyright

Copyright (c) 2011 James Turnbull. Few modifications by Aleksey Timohin. See LICENSE for details.