public inbox for kdevops@lists.linux.dev
 help / color / mirror / Atom feed
From: Daniel Gomez <da.gomez@kernel.org>
To: Chuck Lever <chuck.lever@oracle.com>,
	Jeff Layton <jlayton@kernel.org>,
	kdevops@lists.linux.dev
Subject: Re: [PATCH] devconfig: add a default for kdevops_enable_terraform
Date: Thu, 25 Sep 2025 16:49:16 +0200	[thread overview]
Message-ID: <75ab17ed-3ab6-4e43-b292-2521ad80865c@kernel.org> (raw)
In-Reply-To: <612a655d-644f-4bc8-8f8e-dc65828819e4@oracle.com>



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 <jlayton@kernel.org>
>>>>>>> ---
>>>>>>>  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. <sheesh>
>>>>>>
>>>>>
>>>>> 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 <chuck.lever@oracle.com>
>>>>
>>>
>>> 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]

  reply	other threads:[~2025-09-25 14:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-24 19:42 [PATCH] devconfig: add a default for kdevops_enable_terraform Jeff Layton
2025-09-24 19:48 ` Chuck Lever
2025-09-24 19:55   ` Jeff Layton
2025-09-24 19:57     ` Chuck Lever
2025-09-24 20:14       ` Jeff Layton
2025-09-25 14:29         ` Daniel Gomez
2025-09-25 14:33           ` Chuck Lever
2025-09-25 14:49             ` Daniel Gomez [this message]
2025-09-25 14:51               ` 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=75ab17ed-3ab6-4e43-b292-2521ad80865c@kernel.org \
    --to=da.gomez@kernel.org \
    --cc=chuck.lever@oracle.com \
    --cc=jlayton@kernel.org \
    --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