Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ansible changes the double quotes in json to single quotes #82888

Closed
1 task done
aratim233 opened this issue Mar 22, 2024 · 1 comment
Closed
1 task done

ansible changes the double quotes in json to single quotes #82888

aratim233 opened this issue Mar 22, 2024 · 1 comment

Comments

@aratim233
Copy link

Summary

I'am creating an ansible-playbook which creates a keyvault secret from an json file. The secret_value variable is passed dynamically into the azure_rm_keyvaultsecret but it modifies the data from double quotes to single quotes making it not json.

i have tried adding jinja2_native = True to the ansible.cfg but to no avail

Issue Type

Bug Report

Component Name

azure_rm_keyvaultsecret

Ansible Version

$ ansible --version
ansible [core 2.16.2]
  config file = <>
  configured module search path = ['<>.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = <>/.local/lib/python3.10/site-packages/ansible
  ansible collection location = <>/.ansible/collections:/usr/share/ansible/collections
  executable location = <>/.local/bin/ansible
  python version = 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0] (/usr/bin/python3)
  jinja version = 3.1.3
  libyaml = True

Configuration

# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
CONFIG_FILE() = /home/###/.local/etc/ansible.cfg
DEFAULT_JINJA2_NATIVE(/home/###/.local/etc/ansible.cfg) = True

OS / Environment

ubuntu

Steps to Reproduce

Running the code that takes a json file as dictionary and passing it to the module azure_rm_keyvaultsecret to create a keyvault secret.

Expected Results

no replacement of double quotes to single

Actual Results

it modifies from double quotes to single making in not json

Code of Conduct

  • I agree to follow the Ansible Code of Conduct
@ansibot
Copy link
Contributor

ansibot commented Mar 22, 2024

Thank you very much for your interest in Ansible. Ansible has migrated much of the content into separate repositories to allow for more rapid, independent development. We are closing this issue because this content has been moved to one or more collection repositories.

click here for bot help

@ansibot ansibot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 22, 2024
@ansible ansible locked and limited conversation to collaborators Apr 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants