Project

General

Profile

Actions

Feature #1133

closed

Support configurable exportable "facts" (as tags) and "username" to rundeck

Added by Marcello de Sousa about 13 years ago. Updated about 13 years ago.

Status:
Closed
Priority:
Normal
Category:
API
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

When exporting data o rundeck you should be able to specify what you want to export.
In a similar way you also want to be able to specify the rundeck username.

The proposed solution works as follows:
Default behaviour (no parameters defined):

username = root 
exported facts/tags = classes

If want to change the behaviour, you specify a parameter in Foreman:
Example:
In foreman we've defined 2 parameters for the host "myserver1.mydomain.local" :

 rundeckuser  = mycustomuser 
 rundeckfacts = domain,environment

So, querying:

curl -u admin:changeme "http://foreman/hosts/myserver1.mydomain.local?rundeck=true&format=yaml" 

would result in:

--- 
  myserver1.mydomain.local: 
    osFamily: Redhat 
    osVersion: "5.6" 
    tags: 
      - domain=mydomain.local 
      - environment=master 
      - class=ntp::main 
      - class=puppet::client 
    username: mycustomuser 
    osName: CentOS 
    osArch: x86_64 
    nodename: myserver1.mydomain.local 
    description: My description test 
    hostname: myserver1.mydomain.local

I'll submit a patch...

Actions

Also available in: Atom PDF