public inbox for kdevops@lists.linux.dev
 help / color / mirror / Atom feed
From: Daniel Gomez <da.gomez@kernel.org>
To: Luis Chamberlain <mcgrof@kernel.org>,
	 Chuck Lever <chuck.lever@oracle.com>
Cc: kdevops@lists.linux.dev, Daniel Gomez <da.gomez@samsung.com>
Subject: [PATCH 4/4] terraform: remove redundant ansible inventory and connection overrides
Date: Wed, 17 Sep 2025 10:32:39 +0200	[thread overview]
Message-ID: <20250917-fix-groups-v1-4-d6cd940f8b6e@samsung.com> (raw)
In-Reply-To: <20250917-fix-groups-v1-0-d6cd940f8b6e@samsung.com>

From: Daniel Gomez <da.gomez@samsung.com>

Remove unnecessary --inventory localhost, and connection: local
parameters and embrace the ansible.cfg and playbook hosts fields.

Generated-by: Claude AI
Signed-off-by: Daniel Gomez <da.gomez@samsung.com>
---
 playbooks/gen_tfvars.yml   | 1 -
 playbooks/terraform.yml    | 1 -
 scripts/terraform.Makefile | 7 +------
 3 files changed, 1 insertion(+), 8 deletions(-)

diff --git a/playbooks/gen_tfvars.yml b/playbooks/gen_tfvars.yml
index 11437fa2..9d75c868 100644
--- a/playbooks/gen_tfvars.yml
+++ b/playbooks/gen_tfvars.yml
@@ -1,6 +1,5 @@
 ---
 - name: Generate Terraform variables file (terraform/terraform.tfvars)
-  connection: local
   hosts: localhost
   roles:
     - role: gen_tfvars
diff --git a/playbooks/terraform.yml b/playbooks/terraform.yml
index a740f79f..61a16a2c 100644
--- a/playbooks/terraform.yml
+++ b/playbooks/terraform.yml
@@ -1,6 +1,5 @@
 ---
 - name: Manage infrastructure lifecycle and SSH access with Terraform
-  connection: local
   hosts: localhost
   gather_facts: false
   roles:
diff --git a/scripts/terraform.Makefile b/scripts/terraform.Makefile
index 4d738c82..ef11e0e3 100644
--- a/scripts/terraform.Makefile
+++ b/scripts/terraform.Makefile
@@ -203,23 +203,20 @@ endif
 
 bringup_terraform: lambdalabs-ssh-check
 	$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
-		--inventory localhost, \
 		playbooks/terraform.yml --tags bringup \
 		--extra-vars=@./extra_vars.yaml
 
 $(KDEVOPS_PROVISIONED_SSH):
 	$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
-		--inventory localhost, \
 		playbooks/terraform.yml --tags ssh \
 		--extra-vars=@./extra_vars.yaml
 	$(Q)ansible $(ANSIBLE_VERBOSE) \
-		-i hosts baseline:dev:service \
+		baseline:dev:service \
 		-m wait_for_connection
 	$(Q)touch $(KDEVOPS_PROVISIONED_SSH)
 
 status_terraform:
 	$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
-		--inventory localhost, \
 		playbooks/terraform.yml --tags status \
 		--extra-vars=@./extra_vars.yaml
 
@@ -227,13 +224,11 @@ destroy_terraform: destroy_terraform_base lambdalabs-ssh-clean-after
 
 destroy_terraform_base:
 	$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
-		--inventory localhost, \
 		playbooks/terraform.yml --tags destroy \
 		--extra-vars=@./extra_vars.yaml
 	$(Q)rm -f $(KDEVOPS_PROVISIONED_SSH) $(KDEVOPS_PROVISIONED_DEVCONFIG)
 
 $(KDEVOPS_TFVARS): $(KDEVOPS_TFVARS_TEMPLATE) .config
 	$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
-		--inventory localhost, \
 		$(KDEVOPS_PLAYBOOKS_DIR)/gen_tfvars.yml \
 		--extra-vars=@./extra_vars.yaml

-- 
2.50.1


  parent reply	other threads:[~2025-09-17  8:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-17  8:32 [PATCH 0/4] Fix inconsistent ansible-playbook patterns across kdevops Daniel Gomez
2025-09-17  8:32 ` [PATCH 1/4] workflows: linux: remove explicit inventory in ansible wrappers Daniel Gomez
2025-09-17  8:32 ` [PATCH 2/4] workflows: fix inconsistent ansible-playbook patterns and invalid host groups Daniel Gomez
2025-09-17  8:32 ` [PATCH 3/4] docs: remove deprecated -i hosts pattern from CLAUDE.md example Daniel Gomez
2025-09-17  8:32 ` Daniel Gomez [this message]
2025-09-17 14:28 ` [PATCH 0/4] Fix inconsistent ansible-playbook patterns across kdevops Luis Chamberlain

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=20250917-fix-groups-v1-4-d6cd940f8b6e@samsung.com \
    --to=da.gomez@kernel.org \
    --cc=chuck.lever@oracle.com \
    --cc=da.gomez@samsung.com \
    --cc=kdevops@lists.linux.dev \
    --cc=mcgrof@kernel.org \
    /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