Skip to content

Commit d7028bd

Browse files
dkrucesmcgrof
authored andcommitted
terraform: remove redundant ansible inventory and connection overrides
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 <[email protected]> Signed-off-by: Luis Chamberlain <[email protected]>
1 parent c1f3b7e commit d7028bd

File tree

3 files changed

+1
-8
lines changed

3 files changed

+1
-8
lines changed

playbooks/gen_tfvars.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
---
22
- name: Generate Terraform variables file (terraform/terraform.tfvars)
3-
connection: local
43
hosts: localhost
54
roles:
65
- role: gen_tfvars

playbooks/terraform.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
---
22
- name: Manage infrastructure lifecycle and SSH access with Terraform
3-
connection: local
43
hosts: localhost
54
gather_facts: false
65
roles:

scripts/terraform.Makefile

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -203,37 +203,32 @@ endif
203203

204204
bringup_terraform: lambdalabs-ssh-check
205205
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
206-
--inventory localhost, \
207206
playbooks/terraform.yml --tags bringup \
208207
--extra-vars=@./extra_vars.yaml
209208

210209
$(KDEVOPS_PROVISIONED_SSH):
211210
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
212-
--inventory localhost, \
213211
playbooks/terraform.yml --tags ssh \
214212
--extra-vars=@./extra_vars.yaml
215213
$(Q)ansible $(ANSIBLE_VERBOSE) \
216-
-i hosts baseline:dev:service \
214+
baseline:dev:service \
217215
-m wait_for_connection
218216
$(Q)touch $(KDEVOPS_PROVISIONED_SSH)
219217

220218
status_terraform:
221219
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
222-
--inventory localhost, \
223220
playbooks/terraform.yml --tags status \
224221
--extra-vars=@./extra_vars.yaml
225222

226223
destroy_terraform: destroy_terraform_base lambdalabs-ssh-clean-after
227224

228225
destroy_terraform_base:
229226
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
230-
--inventory localhost, \
231227
playbooks/terraform.yml --tags destroy \
232228
--extra-vars=@./extra_vars.yaml
233229
$(Q)rm -f $(KDEVOPS_PROVISIONED_SSH) $(KDEVOPS_PROVISIONED_DEVCONFIG)
234230

235231
$(KDEVOPS_TFVARS): $(KDEVOPS_TFVARS_TEMPLATE) .config
236232
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
237-
--inventory localhost, \
238233
$(KDEVOPS_PLAYBOOKS_DIR)/gen_tfvars.yml \
239234
--extra-vars=@./extra_vars.yaml

0 commit comments

Comments
 (0)