top of page
  • Black Facebook Icon
  • Black Twitter Icon
  • Black Instagram Icon

[Howto] Add and update SSH keys in Ansible Tower via tower-cli [Update]

olamtortaroge


The tool tower-cli is often used to pre-configure Ansible Tower in a scripted way. It provides a convenient way to boot-strap a Tower configuration, be it for testing environments or to deploy multiple Towers with the same configuration. But adding SSH keys as machine credentials is far from easy.




[Howto] Adding SSH keys to Ansible Tower via tower-cli [Update]




The tool tower-cli is often used to pre-configure Ansible Tower in a scripted way. It provides a convenient way to boot-strap a Tower configuration. But adding SSH keys as machine credentials is far from easy.


My workaround right now is to store the ssh_key_file inside AWX container and when launching the job we set the ansible_private_key_file to /tmp/test.pem. But we actually want to select the name of the credentials from AWX tower instead of storing the keys inside the container.


The first thing to do is setup tower-cli. This is a much better tool than curl to trigger Ansible Tower. From the webhook we will use tower-cli to update projects in Ansible Tower and launch workflows.


2ff7e9595c


0 views0 comments

Recent Posts

See All

Comments


bottom of page