Hello Mates,
I am getting below error while executing playbook for Ec2
Error : fatal: [local]: FAILED! => {“changed”: false, “msg”: “argument ‘image’ is of type <class ‘str’> and we were unable to convert to dict:arse JSON or key=value”}
Below is the code that i am executing;
- name: Create EC2 server
ec2_instance:
image: “{{ami_image }}”
wait: yes
instance_type: t2.micro
region: “{{ region }}”
security_groups: “{{ securitygroup_name }}”
key_name: “{{ keypair.key.name }}”
tags:
Name: apacheserver
aws_access_key: “{{ aws_access_key }}”
aws_secret_key: “{{ aws_secret_key }}”
Kindly help