Re: [PATCH 3/8] terraform: Enable fact gathering for localhost

"Chuck Lever" <[email protected]> Sun, 07 Dec 2025 11:23:25 -0500
Newsgroups dev.linux.lists.kdevops
Message-ID <[email protected]>

On Sat, Dec 6, 2025, at 11:56 AM, Luis Chamberlain wrote:
> The terraform role uses ansible_system and ansible_architecture variables
> to determine the correct installation path for the DataCrunch terraform
> provider. These variables are Ansible facts that are only available after
> fact gathering runs.
>
> Enable gather_facts in the terraform playbook so these variables are
> available when the role executes. This fixes the error when running
> make bringup with DataCrunch provider where ansible_system was undefined.
>
> Generated-by: Claude AI
> Signed-off-by: $(git config user.name) <$(git config user.email)>

The Sob tag is broken.


> ---
>  playbooks/terraform.yml | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/playbooks/terraform.yml b/playbooks/terraform.yml
> index 61a16a2c..3372b927 100644
> --- a/playbooks/terraform.yml
> +++ b/playbooks/terraform.yml
> @@ -1,6 +1,6 @@
>  ---
>  - name: Manage infrastructure lifecycle and SSH access with Terraform
>    hosts: localhost
> -  gather_facts: false
> +  gather_facts: true

IIRC, "gather_facts: true" is the default? It's a nit, but you
could just delete the existing "gather_facts: false" line. I
disabled fact gathering as a small performance optimization,
but there's really no other reason to keep that setting.


>    roles:
>      - role: terraform
> -- 
> 2.51.0

-- 
Chuck Lever