Skip to content

Create terraform cluster via Ansible

Patrick Steinhardt requested to merge pks-terraform-deploy-via-ansible into master

While configuration of the demo cluster is automated via Ansible already, the other scripts still use custom Ruby logic to achieve their tasks. This MR is changing this, most importantly by converting cluster creation from Ruby to Ansible. This has the benefit that it's possible to idempotently re-run cluster creation with Ansible figuring out automatically what has changed and what didn't. Furthermore, I've implemented logic to automatically scan deployed hosts for their SSH host keys and add those to the known_hosts file so SSH won't complain about unknown host keys anymore.

This is another iterative improvement. Eventually, I'd like to see both create.yml and configure.yml playbooks to merge into a single playbook that's deploying and configuring hosts in a single step. This requires some rethinking about how to get required variables into Ansible, as vars_prompt isn't able to re-use cached variables via an inventory. As soon as I've got an idea on how to fix that, merging both playbooks is going to be trivial.

Merge request reports