From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 347A9320F for ; Fri, 2 May 2025 06:46:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746168398; cv=none; b=F40hxNXIN+m2yfU/fMRenhSfycwbBzYchsP8C1VFXuFh9CjDlyzTvA89rRTdZqz/KjvR0jBb4GJtVHJouAMdGp3hRp4dnJHAM4aLvWP8gsNR6DZqTBabk9Gz7B/vMqas1BLEvht78q6sbWxiDpbnwe/mgO/nEoZC/twe930mLVQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746168398; c=relaxed/simple; bh=rAK9vUzzaBLdY4ApIUdw4n4Gulmlhht6ldKuimm42iE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ih2g89u8CebcSR4aDBdNCPKVkmTNOMVpmcsnstSPA/ytwzKsz9tTnit4Kr15CMMZcdAA6M0SMaHRgsOBKYMut4dST4uy6ky5ejFyWgjs8CzYay5rp1kPqlSe9zRRd0GNns8DqI1VEJCbnVuHzj6Bx5aWuZRrOB4hTnXXoYrwNVQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Q9tHn0Vm; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Q9tHn0Vm" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 67749C4CEE4; Fri, 2 May 2025 06:46:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1746168398; bh=rAK9vUzzaBLdY4ApIUdw4n4Gulmlhht6ldKuimm42iE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Q9tHn0Vm7wCJI9/zI39J9T2VMJ9ZneNsk8LF6nUB9+6QCwvow8tnuZ7iCCJTaI4hn T6LoVJ7oTbxIGoc2E1fkCC1SS8mHleU5MfFwJzu6plHeh1Mh/9DOlIdZd6idLtuHKc ayFqiyaQPyKMoyb3/WsQbVv1hku5e5j6bCVTeqs0zToe72x3q2A7s+0EPfwT5LdZ7T wqU/UPxhBhE/csBOsbgETMXPSEYrfTOmQ20IZRVdY+kKWTYLtjiL7RW72FjvGyEhFV 6/Z0xTPH9+n40Muah2M/zT3SSKnrrA5o9iNxdXvxqA1iYvZ0RLSgmvJeBU6KafCZrj dTdU4E5jHgOfQ== From: Chandan Babu R To: kdevops@lists.linux.dev Cc: Chandan Babu R , chuck.lever@oracle.com Subject: [PATCH 2/3] Remove kdevops_terraform_ssh_config_genkey_overwrite Date: Fri, 2 May 2025 12:16:05 +0530 Message-ID: <20250502064609.922565-2-chandanbabu@kernel.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20250502064609.922565-1-chandanbabu@kernel.org> References: <20250502064609.922565-1-chandanbabu@kernel.org> Precedence: bulk X-Mailing-List: kdevops@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 --- 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