* [PATCH] devconfig: add a default for kdevops_enable_terraform
@ 2025-09-24 19:42 Jeff Layton
2025-09-24 19:48 ` Chuck Lever
0 siblings, 1 reply; 9+ messages in thread
From: Jeff Layton @ 2025-09-24 19:42 UTC (permalink / raw)
To: kdevops
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
--
2.51.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] devconfig: add a default for kdevops_enable_terraform
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
0 siblings, 1 reply; 9+ messages in thread
From: Chuck Lever @ 2025-09-24 19:48 UTC (permalink / raw)
To: Jeff Layton, kdevops
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>
--
Chuck Lever
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] devconfig: add a default for kdevops_enable_terraform
2025-09-24 19:48 ` Chuck Lever
@ 2025-09-24 19:55 ` Jeff Layton
2025-09-24 19:57 ` Chuck Lever
0 siblings, 1 reply; 9+ messages in thread
From: Jeff Layton @ 2025-09-24 19:55 UTC (permalink / raw)
To: Chuck Lever, kdevops
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?
--
Jeff Layton <jlayton@kernel.org>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] devconfig: add a default for kdevops_enable_terraform
2025-09-24 19:55 ` Jeff Layton
@ 2025-09-24 19:57 ` Chuck Lever
2025-09-24 20:14 ` Jeff Layton
0 siblings, 1 reply; 9+ messages in thread
From: Chuck Lever @ 2025-09-24 19:57 UTC (permalink / raw)
To: Jeff Layton, kdevops
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. But OK:
Reviewed-by: Chuck Lever <chuck.lever@oracle.com>
--
Chuck Lever
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] devconfig: add a default for kdevops_enable_terraform
2025-09-24 19:57 ` Chuck Lever
@ 2025-09-24 20:14 ` Jeff Layton
2025-09-25 14:29 ` Daniel Gomez
0 siblings, 1 reply; 9+ messages in thread
From: Jeff Layton @ 2025-09-24 20:14 UTC (permalink / raw)
To: Chuck Lever, kdevops
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!
--
Jeff Layton <jlayton@kernel.org>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] devconfig: add a default for kdevops_enable_terraform
2025-09-24 20:14 ` Jeff Layton
@ 2025-09-25 14:29 ` Daniel Gomez
2025-09-25 14:33 ` Chuck Lever
0 siblings, 1 reply; 9+ messages in thread
From: Daniel Gomez @ 2025-09-25 14:29 UTC (permalink / raw)
To: Jeff Layton, Chuck Lever, kdevops
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'
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] devconfig: add a default for kdevops_enable_terraform
2025-09-25 14:29 ` Daniel Gomez
@ 2025-09-25 14:33 ` Chuck Lever
2025-09-25 14:49 ` Daniel Gomez
0 siblings, 1 reply; 9+ messages in thread
From: Chuck Lever @ 2025-09-25 14:33 UTC (permalink / raw)
To: Daniel Gomez, Jeff Layton, kdevops
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.
--
Chuck Lever
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] devconfig: add a default for kdevops_enable_terraform
2025-09-25 14:33 ` Chuck Lever
@ 2025-09-25 14:49 ` Daniel Gomez
2025-09-25 14:51 ` Chuck Lever
0 siblings, 1 reply; 9+ messages in thread
From: Daniel Gomez @ 2025-09-25 14:49 UTC (permalink / raw)
To: Chuck Lever, Jeff Layton, kdevops
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]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] devconfig: add a default for kdevops_enable_terraform
2025-09-25 14:49 ` Daniel Gomez
@ 2025-09-25 14:51 ` Chuck Lever
0 siblings, 0 replies; 9+ messages in thread
From: Chuck Lever @ 2025-09-25 14:51 UTC (permalink / raw)
To: Daniel Gomez, Jeff Layton, kdevops
On 9/25/25 7:49 AM, Daniel Gomez wrote:
>
>
> 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]
>
Here's where "output yaml" might fall down. If the Kconfig entry for
the variable is behind an "if/endif" then the "output yaml" is never
encountered, and we're left without a default value.
--
Chuck Lever
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2025-09-25 14:51 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2025-09-25 14:51 ` Chuck Lever
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox