Skip to content
This repository has been archived by the owner on Jun 12, 2021. It is now read-only.

Apostrophe ' in extra_vars not properly escaped #151

Closed
huan086 opened this issue Feb 17, 2020 · 0 comments
Closed

Apostrophe ' in extra_vars not properly escaped #151

huan086 opened this issue Feb 17, 2020 · 0 comments

Comments

@huan086
Copy link

huan086 commented Feb 17, 2020

Steps to reproduce

plays {
  playbook {
    file_path = "${path.module}/test.yml"
  }

  extra_vars = {
    cannot_pass_quote = "'"
  }
}

Expected behavior

Quotes are escaped automatically.

ansible-playbook test.yml --extra-vars='{"cannot_pass_quote":"\u0027"}'

or

ansible-playbook test.yml --extra-vars='{"cannot_pass_quote":"'\''"}'

Actual behavior

Results in error

ansible-playbook test.yml --extra-vars='{"cannot_pass_quote":"'"}'

Configuration

Terraform version: 0.12.20

terraform-provisioner-ansible version/SHA: 2.3.3

Terraform file / provisioner configuration:

Terraform run log:

@radekg radekg mentioned this issue Nov 7, 2020
radekg added a commit that referenced this issue Nov 8, 2020
@radekg radekg closed this as completed in d943642 Nov 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant