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

feature request: ability to resolve IPs from PuppetDB #628

Closed
sergeyarl opened this issue Sep 9, 2018 · 2 comments
Closed

feature request: ability to resolve IPs from PuppetDB #628

sergeyarl opened this issue Sep 9, 2018 · 2 comments
Labels
Feature New features and improvements.

Comments

@sergeyarl
Copy link

Hi!

I'm sorry if this is already implemented, but unfortunately I was not able to find any references. I'm new to Bolt.

Part of our infrastructure is hosted in AWS environment and is dynamic - new nodes are created and destroyed every now and then automatically. Some of them do not have DNS names set.

As I see Bolt is capable of performing queries against PuppetDB. And PuppetDB has different facts gathered from connected nodes, including nodes' IP addresses.

It would be great if Bold could use these facts to connect to nodes via ssh.

For example now, if I execute

# bolt command run "hostname -f" --query 'inventory { certname ~ "certname_mask" }'

I get

Failed to connect to certname_mask_1: getaddrinfo: Name or service not known
Failed to connect to certname_mask_2: getaddrinfo: Name or service not known

Thanks!

Regards,
Sergey

@MikaelSmith
Copy link
Contributor

Ok, that definitely isn't something that works right now. --query assumes the certname is identical to a domain name it can connect to.

I think we could modify that to ask for domain name and/or ip address. I'm not sure we'd want to default to ip address, as that could behave strangely with SSH's known_hosts file.

@MikaelSmith MikaelSmith added the Feature New features and improvements. label Dec 7, 2018
@lucywyman
Copy link
Contributor

Hello! We now have an AWS dynamic inventory plugin, which I think alleviates this specific problem for now. https://github.com/puppetlabs/bolt/blob/master/pre-docs/inventory_version2.md#aws-ec2 Let me know if this issue needs to be reopened!

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

No branches or pull requests

3 participants