Replies: 2 comments 3 replies
-
I've been trying to get AWX to run templates using teleport as the SSH provider as well: I have got a tbot deployment that runs on a kubernetes cluster and generates a machineid identity as a kubernetes secret (and also tested with a directory output as well). I would like to have Ansible AWX run playbooks using the identity that tbot generates. From the documentation on the website, Ansible (not taking AWX into account yet) can make use of the machineid ssh_config to connect to remote hosts. This seems to be a decent start. AWX spins up a new 'execution environment' each time a template (playbook) is executed, and the playbook is executed from this environment. For teleport, one challenge is that the fresh execution environment should have the teleport credentials available. This can probably be resolved by mounting the secret into the execution environment (although it's not clear if this is possible). The machineid output as a kubernetes secret does not contain the ssh_config details though, and this would be problematic if trying to configure the AWX execution environment use the custom teleport ssh_config file. This might necessitate the use of a directory output. An option here could be to run tbot outside of kubernetes (or as DaemonSet with a hostDir volume) on each worker node that the AWX environment can run on. This would allow the machineid output to point to a node filesystem directory which is then imported (path exposed to isloated jobs) within AWX to the execution environment. Neither of these strike me as ideal. Has anyone got teleport working with AWX? |
Beta Was this translation helpful? Give feedback.
-
@AlexisDuf Thx) |
Beta Was this translation helpful? Give feedback.
-
Has anyone been able to figure out how to use teleport with AWX? What I mean by that is:
I have teleport providing dynamic inventory to ansible on my local system, with ansible configured to use teleport's ssh proxy, and that works perfectly. What I can't figure out is how to get that working inside AWX. I know that I need to get teleport installed in various containers for AWX, I need teleport service accounts setup, and AWX has to be configured to use teleport when connecting by ssh to inventory hosts, and the dynamic inventory plugin has to be able to connect to teleport via that service account automatically.
Has anyone done that? The AWX documentation is pretty sparse on adding extra tools to the k8s images it deploys.
Beta Was this translation helpful? Give feedback.
All reactions