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 6FDD42E0916 for ; Thu, 25 Sep 2025 14:49:20 +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=1758811760; cv=none; b=B1mDrdu9UiDOd7sfofe/yoxIkvWfVfR1GppTlRvnPsQD1YUouhvEYqdxATp/aG2j8WA5RLqMMd2+mqbafLXsoZbQZ2cTjNYLq9A3bCE/sgFShv7GpSO8l2mTd1+yNX4J/p92SS6ow65nMfQg/QH5t2LOFqPp/D432gIp76SldsE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758811760; c=relaxed/simple; bh=7gRKleR8zx26ZlA8g4ZlJ/ZG22JDA6+9DGPgG0mnoXM=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type; b=k34CD4hHCIYR1Ie3dxlbpkFt3Zfwp4WnC5xSMoY+mxC3SP8YdGSnERBKK+gc1ZXzkMzG5igYwbk4qmJEnD5XO0dQK82qGWymnvzJvpZ/PwcDUKgncoehcSdDzvYqRXLWSx0H4gP1YvCGwwrK+0GSCI78ZOU2EOmOWr0aIHcgQ5k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=JE7y5f9l; 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="JE7y5f9l" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 13EFBC4CEF0; Thu, 25 Sep 2025 14:49:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1758811759; bh=7gRKleR8zx26ZlA8g4ZlJ/ZG22JDA6+9DGPgG0mnoXM=; h=Date:Reply-To:Subject:To:References:From:In-Reply-To:From; b=JE7y5f9l/rdGpumI3/u5tbCggFYveRTERjGPtjL/M5WtzFLgoLVOUVD4lXE48H96X 04tsy9+MHFJV6anKiIuUqFM+4PTlPIDaWtQop9y6VcYwh161LIt1KknOaH7DUSfaT1 Pc37fyfRIhnEMH170F1F3XIrH3+kPrE2gH1CwTQBAwB6p0UH9bNAFXxuIKl5hTT8kM BYWV0VahZrnWB/vh6vc0NMb0lzH6efBYLUIAZ1/QGokkp2sEe7NZRthxv1is5noabk Dcx2OmwKPj5Szid1etfPG27G2alCIZlOkpoCe5dFbC/XX5YcECQziGkmJfifaqQQ/Q +dQ8q5iYizXBw== Message-ID: <75ab17ed-3ab6-4e43-b292-2521ad80865c@kernel.org> Date: Thu, 25 Sep 2025 16:49:16 +0200 Precedence: bulk X-Mailing-List: kdevops@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Reply-To: Daniel Gomez Subject: Re: [PATCH] devconfig: add a default for kdevops_enable_terraform To: Chuck Lever , Jeff Layton , kdevops@lists.linux.dev References: <20250924194212.323964-1-jlayton@kernel.org> <1753aeff-7f06-4cf6-afe2-1d17fc08cb81@oracle.com> <59d08e3ca1161d0be7c35ab94147fb22d11f77c9.camel@kernel.org> <36b5d7f2-2726-4a48-9ff5-bcd0b8cfddd3@kernel.org> <612a655d-644f-4bc8-8f8e-dc65828819e4@oracle.com> Content-Language: en-US From: Daniel Gomez Organization: kernel.org In-Reply-To: <612a655d-644f-4bc8-8f8e-dc65828819e4@oracle.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 25/09/2025 16.33, Chuck Lever wrote: > On 9/25/25 7:29 AM, Daniel Gomez wrote: >> On 24/09/2025 22.14, Jeff Layton wrote: >>> On Wed, 2025-09-24 at 15:57 -0400, Chuck Lever wrote: >>>> On 9/24/25 12:55 PM, Jeff Layton wrote: >>>>> On Wed, 2025-09-24 at 15:48 -0400, Chuck Lever wrote: >>>>>> On 9/24/25 12:42 PM, Jeff Layton wrote: >>>>>>> Fixes: 7710a1e2e820 ("devconfig: Remove "dnf update" optimizations for terraform hosts") >>>>>>> Signed-off-by: Jeff Layton >>>>>>> --- >>>>>>> playbooks/roles/devconfig/defaults/main.yml | 1 + >>>>>>> 1 file changed, 1 insertion(+) >>>>>>> >>>>>>> diff --git a/playbooks/roles/devconfig/defaults/main.yml b/playbooks/roles/devconfig/defaults/main.yml >>>>>>> index c5c06e01b06d..b5d4724d37ef 100644 >>>>>>> --- a/playbooks/roles/devconfig/defaults/main.yml >>>>>>> +++ b/playbooks/roles/devconfig/defaults/main.yml >>>>>>> @@ -59,3 +59,4 @@ distro_debian_has_hop1_sources: false >>>>>>> unattended_upgrades_installed: false >>>>>>> workflow_infer_user_and_group: false >>>>>>> kdevops_use_declared_hosts: false >>>>>>> +kdevops_enable_terraform: false >>>>>> >>>>>> Yeah. "output yaml" doesn't work the way I expect. >>>>>> >>>>> >>>>> The way these defaults get set seems very random and fragmented to me. >>>>> >>>>> Can I take your "Yeah" as a R-b? >>>> >>>> I didn't give a full-throated R-b because I'm wondering if there's >>>> a better way to approach this general problem. >>>> >>> >>> That's the way I feel too. I don't get the logic of when to set >>> variables in a limited way like this and when to do it more globally. >>> For now, this at least gets things running again for me. >>> >>>> But OK: >>>> >>>> Reviewed-by: Chuck Lever >>>> >>> >>> Thanks! >> >> What are we fixing exactly? What does it mean "output yaml" doesn't work as >> expected? >> >> I assume Ansible complains about kdevops_enable_terraform not being defined. >> In that case, if we have kconfig yaml output, the devconfig playbook should >> parse it via .extra_vars_auto.yaml. Note that the extra_vars.yaml way with >> *_EXTRA_VARS should be removed at some point to make things easier. At this >> point we are supporting multiple ways to share variables from Kconfig -> Ansible >> and we don't want that. >> >> But i don't see Kconfig support for this variable... >> >> git grep -i kdevops_enable_terraform >> playbooks/roles/codereadyrepo/defaults/main.yml:kdevops_enable_terraform: false >> playbooks/roles/codereadyrepo/tasks/main.yml: - kdevops_enable_terraform >> playbooks/roles/codereadyrepo/tasks/main.yml: - kdevops_enable_terraform >> playbooks/roles/codereadyrepo/tasks/main.yml: - kdevops_enable_terraform >> playbooks/roles/create_data_partition/defaults/main.yml:kdevops_enable_terraform: false >> playbooks/roles/create_data_partition/tasks/main.yml: - kdevops_enable_terraform|bool >> playbooks/roles/devconfig/tasks/install-deps/redhat/main.yml: - not kdevops_enable_terraform|bool >> playbooks/roles/devconfig/tasks/install-deps/redhat/main.yml: - not kdevops_enable_terraform|bool >> playbooks/roles/gen_nodes/defaults/main.yml:kdevops_enable_terraform: false >> playbooks/roles/gen_tfvars/tasks/main.yml: - kdevops_enable_terraform >> playbooks/roles/volume_group/defaults/main.yml:kdevops_enable_terraform: false >> playbooks/roles/volume_group/tasks/main.yml: - kdevops_enable_terraform|bool >> scripts/terraform.Makefile:TERRAFORM_EXTRA_VARS += kdevops_enable_terraform='True' > > My bad. I thought I remembered there was an "output yaml" for this > variable; but no, it's set as an EXTRA VAR. > > And I see that codereadyrepo handles the default value just as Jeff's > patch does it. > > So, I take back my cursing. Jeff's fix is correct as it stands. > > No problem. FWIW, I've been thinking about this cleanup for a while [1]. What I think it may work best is: Kconfig -> .config -> Makefile (I believe there are some variables we use not only for Ansible) -> vars.yaml -> Ansible But this is another topic. The correct way would be to add this variable in Kconfig and get it right away in Ansible with output yaml. If we want playbooks to be reusable outside kdevops, all these default playbook variables are anyway needed. Link: https://lore.kernel.org/kdevops/c7h4w4jwtrf5q3h77tcxsgpiq7x3ij6zcu5qtmf3akyvntuenb@cesvkshy7xvt/ [1]