Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the Attribute Reported as Hostname Configurable #60

Open
dennis-benzinger-hybris opened this issue Dec 5, 2014 · 4 comments
Open

Comments

@dennis-benzinger-hybris
Copy link

It would be nice if the attribute which is reported as the hostname to Rundeck was configurable. So that Rundeck can use any of the attributes returned by Chef to connect to the VMs.
For example to use the nodename instead of the hostname. Not every network setup let's you connect to the VMs using the hostname of the VM.
This would also help with the tickets #59 and #4.

@dennis-benzinger-hybris
Copy link
Author

Hm, after reading the code I think this is already possible by setting the hostname variable in the project configuration. Unfortunately the format of this configuration file is not documented.

@dennis-benzinger-hybris
Copy link
Author

A very basic example of a project configuration would be:

{
  "URL_PATH": {
    "hostname": "CUSTOM_HOSTNAME_ATTRIBUTE",
    "pattern": "*:*"
  }
}

Then chef-rundeck serves the node information with your custom hostname at URL_PATH.

@djdefi
Copy link
Contributor

djdefi commented Oct 26, 2015

How would one reference an attribute such as ec2::public_hostname ?

I have tried a few different formats / syntaxes but not getting anything

@djdefi
Copy link
Contributor

djdefi commented Oct 28, 2015

To answer my own question... You can't without modifying the code at Line 229

Change to:

   n['hostname'] = get_custom_attr(node, hostname.split('.'))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants