Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Commit 5eef1fb

Browse files
committed
fix(terraform): wait for Terraform lock file
Wait for Terraform lock file to be gone before applying Terraform plans.
1 parent 8352c86 commit 5eef1fb

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
---
2+
- name: Wait until Terraform lock file is gone
3+
wait_for:
4+
path: "{{ stackhead__system_tf_root_folder }}.terraform.tfstate.lock.info"
5+
state: absent
26
- name: "Apply system terraform plans"
3-
terraform:
7+
community.general.terraform:
48
project_path: '{{ stackhead__system_tf_root_folder }}'
59
force_init: yes
610
state: "present"

ansible/roles/config_terraform/tasks/execute.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
---
2+
- name: Wait until Terraform lock file is gone
3+
wait_for:
4+
path: "{{ stackhead__tf_root_folder }}.terraform.tfstate.lock.info"
5+
state: absent
26
- name: "StackHead::Project || Apply terraform plans"
37
community.general.terraform:
48
project_path: '{{ stackhead__tf_root_folder }}'

0 commit comments

Comments
 (0)