JSON Parameter Parsing Error
Symptoms
JSON parameters are not replaced or parsed as expected during the Ansible application deployment.
- Input parameters: {"key":"jsonkey","value":"jsonvalue"}
- Parameters after replacement: {u'value': u'jsonvalue', u'key': u'jsonkey'}
Solution
Enclose JSON parameters with single quotation marks. The template module will forcibly parse the parameters in character string mode to ensure correct replacement. The following is an example:
- Input parameters: {"key":"jsonkey","value":"jsonvalue"}
- Parameters after replacement: {"key":"jsonkey","value":"jsonvalue"}
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot