I am using Jenkins to remotely run an Ansible playbook via the Publish Over SSH
command.
This command:
curl -k -v -X POST https://jenkins.m
Since this level of nesting isn't detailed anywhere in the Jenkins or Ansible documentation I'll shed some light on the topic now that I've solved my issue.
The command:
ansible-playbook /home/
Should have declared thisIsAList
to be a dictionary object. I.e.:
ansible-playbook /home/
Furthermore, the data in the cURL
command should've been formatted differently like so:
json='{"parameter":[{"name":"thisIsAList","value":"[one,two,three]"}]}'
Note: the double-quotes are around the whole list, rather than the individual elements.
Finally, with further nested items (such as dict inside a list) you have to escape the double-quotes like so:
{"parameter":[{"name":"thisIsADictNestedInAList","value":"[{\"name\":\"numbers\",\"value\":[1s, 2s, 3s]}]"}]}
It seems, that at this level of nesting, it is no longer required to double-quote the lists; probably because the quotes one level up already lead it to be interpreted correctly.