- name: Launch instance
local_action: ec2 keypair={{ keypair }} instance_type={{ instance_type }}
image={{ image }} region={{ region }}
aws_access_key={{ aws_access_key }}
aws_secret_key={{ aws_secret_key }}
group={{ security_group }} wait=true
instance_profile_name=arn:aws:iam::127847392001:instance-profile/administrator
register: ec2
and Ansible says
Instance Profile ARN(s) arn:aws:iam::127847392001:instance-profile/administrator
TASK: [ec2 | Launch instance] *************************************************
failed: [localhost] => {“failed”: true, “item”: “”}
msg: Instance creation failed => InvalidParameterValue: Value (arn:aws:iam::127847392001:instance-profile/administrator) for parameter iamInstanceProfile.name is invalid. Invalid IAM Instance Profile name
Have also tried with double quotes around name
instance_profile_name=“arn:aws:iam::127847392001:instance-profile/administrator”
Looking at Amazon console I see a role named - administrator. I can launch instances without Ansible using the above profile.
Is this a syntax problem, or am I in the wrong environment or something.
Thaks
mark