best way to modify json in ansible

前端 未结 2 1715
野的像风
野的像风 2020-12-10 17:24

I have a variable (via set_fact) containing a json string:

{
  \"PolicyVersion\": {
    \"CreateDate\": \"2017-08-07T02:48:05Z\",
    \"Document\": {
      \         


        
2条回答
  •  情书的邮戳
    2020-12-10 17:45

    Actually Ansible is natively able to read JSON files.

    see this question:

    add-a-new-key-value-to-a-json-file-using-ansible

提交回复
热议问题