gravitational / teleport

The easiest, and most secure way to access and protect all of your infrastructure.
https://goteleport.com
GNU Affero General Public License v3.0
17.04k stars 1.71k forks source link

Add support to output Ansible-compatible inventory (server list) to tsh #1696

Closed kontsevoy closed 1 year ago

kontsevoy commented 6 years ago

Introduction

It would be nice to have tsh produce output which can be directly fed into ansible.

Solution

We've got a pretty good PR from the awesome Teleport user @halfa here: #1456 While we can't accept the PR as-is (read comments there) we still want to do it, building on @hala's excellent work.

Going to close that PR but keep a reference for it here.

chuckyz commented 5 years ago

Hello I'm wondering there been any progress on including this anywhere? I've recently installed 2.7.3 and was about to write something of my own before running across this, and seeing it several versions behind has me somewhat concerned, would this be too difficult to implement into a current version?

halfa commented 5 years ago

@chuckyz the patch is trivially ported to 2.6 and 2.7 branches. I maintain a patched branch in my repo, on the 2.7/tsh-ansible branch. You only need to compile teleport from it to get the patched binaries.

kontsevoy commented 5 years ago

@chuckyz once you see this ticket assigned to a milestone, you'll see the Teleport version where it will be scheduled for.

stevenGravy commented 1 year ago

Examples of getting information in a format that works with Ansible. https://goteleport.com/docs/server-access/guides/ansible/#step-23-configure-ansible