From: Chandan Babu R <chandanbabu@kernel.org>
To: kdevops@lists.linux.dev
Cc: Chandan Babu R <chandanbabu@kernel.org>, chuck.lever@oracle.com
Subject: [PATCH 2/3] Remove kdevops_terraform_ssh_config_genkey_overwrite
Date: Fri, 2 May 2025 12:16:05 +0530 [thread overview]
Message-ID: <20250502064609.922565-2-chandanbabu@kernel.org> (raw)
In-Reply-To: <20250502064609.922565-1-chandanbabu@kernel.org>
Adding entries to the ephemeral ssh config file on control systems is being
done only when kdevops_terraform_ssh_config_genkey_overwrite evaluates to
true. This is incorrect because we need to allow Kdevops to be used with
pre-existing ssh keys. Hence remove the conditions in
playbooks/roles/terraform/defaults/main.yml which check the value of
kdevops_terraform_ssh_config_genkey_overwrite.
Also, the value of kdevops_terraform_ssh_config_genkey_overwrite is not
checked in any other file. Hence this commit removes the remaining instances
of this variable.
Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
---
playbooks/roles/terraform/defaults/main.yml | 1 -
playbooks/roles/terraform/tasks/main.yml | 8 --------
scripts/terraform.Makefile | 1 -
3 files changed, 10 deletions(-)
diff --git a/playbooks/roles/terraform/defaults/main.yml b/playbooks/roles/terraform/defaults/main.yml
index f3ef9b18..33bd00e6 100644
--- a/playbooks/roles/terraform/defaults/main.yml
+++ b/playbooks/roles/terraform/defaults/main.yml
@@ -1,3 +1,2 @@
---
ssh_config_kexalgorithms: ""
-kdevops_terraform_ssh_config_genkey_overwrite: false
diff --git a/playbooks/roles/terraform/tasks/main.yml b/playbooks/roles/terraform/tasks/main.yml
index 272ebf93..d04dc997 100644
--- a/playbooks/roles/terraform/tasks/main.yml
+++ b/playbooks/roles/terraform/tasks/main.yml
@@ -15,8 +15,6 @@
cmd: "terraform output -json public_ip_map"
register: terraform_output
changed_when: false
- when:
- - kdevops_terraform_ssh_config_genkey_overwrite|bool
tags:
- ssh
@@ -25,8 +23,6 @@
run_once: true
ansible.builtin.set_fact:
public_ip_map: "{{ terraform_output.stdout | from_json }}"
- when:
- - kdevops_terraform_ssh_config_genkey_overwrite|bool
tags:
- ssh
@@ -40,8 +36,6 @@
insertafter: "EOF"
marker: "# {mark} host configuration for {{ inventory_hostname }}"
mode: "u=rw,g=r,o=r"
- when:
- - kdevops_terraform_ssh_config_genkey_overwrite|bool
tags:
- ssh
@@ -55,8 +49,6 @@
marker: "# {mark} Managed by kdevops"
mode: "u=rw,g=r,o=r"
block: "Include {{ kdevops_ssh_config_prefix }}*"
- when:
- - kdevops_terraform_ssh_config_genkey_overwrite|bool
tags:
- ssh
diff --git a/scripts/terraform.Makefile b/scripts/terraform.Makefile
index b6b26e69..865c84c3 100644
--- a/scripts/terraform.Makefile
+++ b/scripts/terraform.Makefile
@@ -92,7 +92,6 @@ export KDEVOPS_SSH_PRIVKEY:=$(basename $(KDEVOPS_SSH_PUBKEY))
ifeq (y,$(CONFIG_TERRAFORM_SSH_CONFIG_GENKEY_OVERWRITE))
DEFAULT_DEPS += remove-ssh-key
-TERRAFORM_EXTRA_VARS += kdevops_terraform_ssh_config_genkey_overwrite='True'
endif
DEFAULT_DEPS += $(KDEVOPS_SSH_PRIVKEY)
--
2.45.2
next prev parent reply other threads:[~2025-05-02 6:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-02 6:46 [PATCH 1/3] Set kdevops_terraform_ssh_config_privkey_file unconditionally Chandan Babu R
2025-05-02 6:46 ` Chandan Babu R [this message]
2025-05-02 15:30 ` [PATCH 2/3] Remove kdevops_terraform_ssh_config_genkey_overwrite Chuck Lever
2025-05-02 6:46 ` [PATCH 3/3] Allow private IP address to be assigned to instances created on OCI Chandan Babu R
2025-05-02 15:30 ` Chuck Lever
2025-05-02 16:31 ` Chuck Lever
2025-05-05 7:45 ` Chandan Babu R
2025-05-02 15:32 ` [PATCH 1/3] Set kdevops_terraform_ssh_config_privkey_file unconditionally Chuck Lever
2025-05-02 16:07 ` Chuck Lever
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250502064609.922565-2-chandanbabu@kernel.org \
--to=chandanbabu@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=kdevops@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox