There is an issue: the values of key-1, key-2 and key--3 are modified. It 
seems that the translation does not stop at the first encountered key colon.
With ansible 2.9.5 from pip3, I get:
    "ansible_facts": {
        "my_list2": [
            {
                "key-1": "$.*?/|\\^(){}+@[]&_-",
                "key-2": [
                    "$.*?/|\\^(){}+@[]&_-",
                    "{ }",
                    "value23"
                ],
                "key-3": "value31",
                "key-4": [
                    "value41",
                    "value42"
                ],
                "key-5": "value51"
            },
            {
                "_key-2": [
                    "value24",
                    "value25"
                ],
                "key--3": "$.*?/|\\^(){}+@[]&_-",
                "key-1-": "value12",
                "key-5---": "value52"
            }
        ]
    },

 Also, in reality, the input data can be structured in other ways than a 
list, such as:
my_struct:
  config:
    key_1: '$.*?/|\^(){}+@[]&_-'
    key_2:
      - '$.*?/|\^(){}+@[]&_-'
      - "{\_}"
      - value23

We cannot assume that the passed data are a list or not.

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/23468d02-63a2-45bf-8448-89dcfef30718%40googlegroups.com.

Reply via email to