i am unable to run ec2 palybook

58 views
Skip to first unread message

prasanna kumar

unread,
Mar 15, 2022, 7:14:26 AM3/15/22
to dick....@geant.org, ansible...@googlegroups.com
Dear Dick,

Kindly help me with this issue I am getting errors.

image.png


Thanks & regards,
Prasanna Kumar .S

Rilindo Foster

unread,
Mar 15, 2022, 10:34:26 AM3/15/22
to ansible...@googlegroups.com
Hi Prasanna!

Can you copy and paste the relevant code that the error is coming from?

Rilindo Foster - Cloud Reliability Architect


On Mar 15, 2022, at 6:14 AM, prasanna kumar <prassu....@gmail.com> wrote:

Dear Dick,

Kindly help me with this issue I am getting errors.

<image.png>


Thanks & regards,
Prasanna Kumar .S

--
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 ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAOf-3v7547u%2BDGR-puYpY4A7r48Zgah3LWAsKeKXOwxpyxWABQ%40mail.gmail.com.


This email and its attachments are confidential and may be privileged.  Any unauthorized use or disclosure is prohibited.  If you receive this email in error, please notify the sender and permanently delete the original without forwarding, making any copies or disclosing its contents. NextCapital is a brand name representing NextCapital Group, Inc. and its subsidiaries, NextCapital Software, Inc. and NextCapital Advisers, Inc. 

prasanna kumar

unread,
Mar 15, 2022, 10:38:48 AM3/15/22
to ansible...@googlegroups.com
Dear Rilindo foster,

This is the error code please find attached screenshot.



--

Rilindo Foster

unread,
Mar 15, 2022, 10:51:21 AM3/15/22
to ansible...@googlegroups.com
Prasanna,

That is not useful, so I am going to make a guess.

Based on this, you are probably using this sensible module:


Based on the error, it is likely you are using image, which requires the value be passed as a dictionary. So either the value is passed as a dictionary or you simply use image_id - like this from the example:

- name: start an instance with a public IP address
  amazon.aws.ec2_instance:
    name: "public-compute-instance"
    key_name: "prod-ssh-key"
    vpc_subnet_id: subnet-5ca1ab1e
    instance_type: c5.large
    security_group: default
    network:
      assign_public_ip: true
    image_id: ami-123456
    tags:
      Environment: Testing


Rilindo Foster - Cloud Reliability Architect


On Mar 15, 2022, at 9:38 AM, prasanna kumar <prassu....@gmail.com> wrote:

Dear Rilindo foster,

This is the error code please find attached screenshot.

<image_123986672.JPG>

prasanna kumar

unread,
Mar 15, 2022, 11:27:06 AM3/15/22
to ansible...@googlegroups.com
Dear Rilindo foster,

This is the script, this is error code, kindly help me, tomorrow we are going implement client demo purpose 

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"}



image.png'









Reply all
Reply to author
Forward
0 new messages