Skip to content

Commit 04c0b1c

Browse files
fix: close if statements
1 parent 14ba28a commit 04c0b1c

File tree

1 file changed

+7
-7
lines changed
  • solutions/standard-openshift/ansible

1 file changed

+7
-7
lines changed

solutions/standard-openshift/ansible/main.tf

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ resource "terraform_data" "execute_playbooks" {
122122
# Decrypt ocp config if it already exists
123123
provisioner "remote-exec" {
124124
inline = [
125-
"if [ -f \"~/.powervs/config.json\" ]; then echo ${var.ansible_vault_password} > password_file",
126-
"if [ -f \"~/.powervs/config.json\" ]; then ansible-vault decrypt ~/.powervs/config.json --vault-password-file password_file"
125+
"if [ -f \"~/.powervs/config.json\" ]; then echo ${var.ansible_vault_password} > password_file; fi",
126+
"if [ -f \"~/.powervs/config.json\" ]; then ansible-vault decrypt ~/.powervs/config.json --vault-password-file password_file; fi"
127127
]
128128
}
129129

@@ -145,8 +145,8 @@ resource "terraform_data" "execute_playbooks" {
145145
# Encrypt ocp config if it already exists
146146
provisioner "remote-exec" {
147147
inline = [
148-
"if [ -f \"~/.powervs/config.json\" ]; then echo ${var.ansible_vault_password} > password_file",
149-
"if [ -f \"~/.powervs/config.json\" ]; then ansible-vault encrypt ~/.powervs/config.json --vault-password-file password_file",
148+
"if [ -f \"~/.powervs/config.json\" ]; then echo ${var.ansible_vault_password} > password_file; fi",
149+
"if [ -f \"~/.powervs/config.json\" ]; then ansible-vault encrypt ~/.powervs/config.json --vault-password-file password_file; fi",
150150
"rm -f password_file"
151151
]
152152
}
@@ -226,7 +226,7 @@ resource "terraform_data" "execute_playbooks_with_vault" {
226226
# Decrypt ocp config if it already exists
227227
provisioner "remote-exec" {
228228
inline = [
229-
"if [ -f \"~/.powervs/config.json\" ]; then ansible-vault decrypt ~/.powervs/config.json --vault-password-file password_file"
229+
"if [ -f \"~/.powervs/config.json\" ]; then ansible-vault decrypt ~/.powervs/config.json --vault-password-file password_file; fi"
230230
]
231231
}
232232

@@ -241,8 +241,8 @@ resource "terraform_data" "execute_playbooks_with_vault" {
241241
# Encrypt ocp config if it already exists
242242
provisioner "remote-exec" {
243243
inline = [
244-
"if [ -f \"~/.powervs/config.json\" ]; then echo ${var.ansible_vault_password} > password_file",
245-
"if [ -f \"~/.powervs/config.json\" ]; then ansible-vault encrypt ~/.powervs/config.json --vault-password-file password_file",
244+
"if [ -f \"~/.powervs/config.json\" ]; then echo ${var.ansible_vault_password} > password_file; fi",
245+
"if [ -f \"~/.powervs/config.json\" ]; then ansible-vault encrypt ~/.powervs/config.json --vault-password-file password_file; fi",
246246
"rm -f password_file"
247247
]
248248
}

0 commit comments

Comments
 (0)