Replace terraform update_ssh_config module
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest6 patches 0 repliesNew
- v212 patches 4 repliesSuperseded
- v1 RFC4 patches 0 repliesSuperseded
Changes in v3 from the cover letter
- Move terraform bringup/destroy into an Ansible playbook
- Move terraform's ssh configuration into that playbook
- Tested with AWS, Azure, and OCI
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | terraform: Replace scripts/*_terraform.sh with an Ansible playbookplaybooks/ playbooks/ scripts/ +2 more | +33 | 0 replies | |
| 2/6 | ssh.Makefile: Define a kdevops_ssh_config variablekconfigs/ scripts/ | +25 | 0 replies | |
| 3/6 | terraform: Clean up ssh configuration during "make destroy"playbooks/ scripts/ | +10 | 0 replies | |
| 4/6 | terraform: Add ssh hosts to ~/.ssh/config_kdevops_{{ sha1sum }}playbooks/ playbooks/ playbooks/ +6 more | +131 | 0 replies | |
| 5/6 | terraform: "make mrproper" should remove terraform/*/.terraformMakefile | +1 | 0 replies | |
| 6/6 | terraform: Remove the terrraform update_ssh_config moduleterraform/ terraform/ terraform/ +12 more | +3 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.
Cover letter [PATCH v3 0/6] Replace terraform update_ssh_config module
From: Chuck Lever <[email protected]>
Luis suggested merging the way guestfs and terraform handle ssh host config. This series is a step in that direction.
guestfs provisioning is currently implemented nearly entirely by shell scripts. That makes it somewhat high risk to re-write both terraform and guestfs to use shared infrastructure at the same time. So instead of building infrastructure that guestfs and terraform can share, I'm leaving guestfs out of the equation for the moment. All this series does is make terraform ssh configuration behave more like guestfs.
Subsequent work can replace the current set of guestfs scripts with Ansible playbooks, and then more common ssh infrastructure can be introduced that both provisioning methods can utilize.
Change since v2:
- Move terraform bringup/destroy into an Ansible playbook
- Move terraform's ssh configuration into that playbook
- Tested with AWS, Azure, and OCI
Changes since RFC:
- Split the RFC series into smaller patches for easier review
- The "Include" directive now follows CONFIG_KDEVOPS_SSH_CONFIG
- Various bug fixes and optimizations
Chuck Lever (6):
terraform: Replace scripts/*_terraform.sh with an Ansible playbook ssh.Makefile: Define a kdevops_ssh_config variable
terraform: Clean up ssh configuration during "make destroy"
terraform: Add ssh hosts to ~/.ssh/config_kdevops_{{ sha1sum }}
terraform: "make mrproper" should remove terraform/*/.terraform
terraform: Remove the terrraform update_ssh_config module
Makefile | 1 + kconfigs/Kconfig.ssh | 19 +++- playbooks/roles/terraform/defaults/main.yml | 3 + playbooks/roles/terraform/tasks/main.yml | 86 +++++++++++++++++++ .../roles/terraform/templates/ssh_config.j2 | 15 ++++ playbooks/terraform.yml | 5 ++ scripts/bringup_terraform.sh | 12 --- scripts/destroy_terraform.sh | 10 --- scripts/ssh.Makefile | 10 ++- scripts/terraform.Makefile | 35 ++++++-- terraform/aws/output.tf | 30 ++----- terraform/aws/update_ssh_config.tf | 1 - terraform/aws/update_ssh_config_use.tf | 12 --- terraform/azure/output.tf | 22 ++--- terraform/azure/update_ssh_config.tf | 1 - terraform/azure/update_ssh_config_use.tf | 4 - terraform/gce/output.tf | 31 ++----- terraform/gce/update_ssh_config.tf | 1 - terraform/gce/update_ssh_config_use.tf | 4 - terraform/oci/output.tf | 9 ++ terraform/oci/update_ssh_config.tf | 1 - terraform/oci/update_ssh_config_use.tf | 8 -- terraform/openstack/output.tf | 9 ++ terraform/openstack/update_ssh_config.tf | 1 - terraform/openstack/update_ssh_config_use.tf | 4 - terraform/update_ssh_config.tf | 17 ---- 26 files changed, 198 insertions(+), 153 deletions(-) create mode 100644 playbooks/roles/terraform/defaults/main.yml create mode 100644 playbooks/roles/terraform/tasks/main.yml create mode 100644 playbooks/roles/terraform/templates/ssh_config.j2 create mode 100644 playbooks/terraform.yml delete mode 100755 scripts/bringup_terraform.sh delete mode 100755 scripts/destroy_terraform.sh delete mode 120000 terraform/aws/update_ssh_config.tf delete mode 100644 terraform/aws/update_ssh_config_use.tf delete mode 120000 terraform/azure/update_ssh_config.tf delete mode 100644 terraform/azure/update_ssh_config_use.tf delete mode 120000 terraform/gce/update_ssh_config.tf delete mode 100644 terraform/gce/update_ssh_config_use.tf create mode 100644 terraform/oci/output.tf delete mode 120000 terraform/oci/update_ssh_config.tf delete mode 100644 terraform/oci/update_ssh_config_use.tf delete mode 120000 terraform/openstack/update_ssh_config.tf delete mode 100644 terraform/openstack/update_ssh_config_use.tf delete mode 100644 terraform/update_ssh_config.tf
Signature · 1 line
2.48.1