When attempting to deploy cloud.ansible with the count property, Deployment fails on the ansible resource with the error:
'create' operation failed: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 3 path $. when attempting to deploy clustered resource
Aria Automation 8.x
The error typically indicates that the YAML code module interacting with a cloud provider (such as AWS, Azure, GCP, etc.) has been provided with incorrect or improperly configured properties passed in cloud.ansible.
Ensure the YAML is syntax correct. Below is the sample YAML for cloud.ansbile with the count property.
Cloud_Ansible_Set_Prereqs:
type: Cloud.Ansible
properties:
count: ${input.count}
host: ${resource.ubuntu_cloudinit.*}
hostName: ${resource.ubuntu_cloudinit.address[count.index]}
osType: linux
account: Ansible_account
username: root
password: ${secret.ansible_password}
hostVariables: |
db_user: root
db_password: ${secret.linux_passwd}
db_ip: ${resource.ubuntu_cloudinit.address}
playbooks:
provision:
- /root/playbooks/prep_prereqs.yaml