1

I'm trying to implement a playbook dealing with Amazon EC2 . I came to the part where I want to create a new image( I used a role for that ), here is what I did:

---
- debug: msg="{{ id_image }}"
- ec2_ami:
    instance_id: "{{ id_image }}"
    name: azzouz
    wait: no
    region: "{{ aws_region }}"
    tags:
      project: "{{ project }}"
  register: image

I tried to specifiy the timeout to 900 and it's still not working. I changed it to wait: no and I'm still dealing with the same problem, here is last part of the error:

 ... return self._sslobj.read(len)\nssl.SSLError: The read operation timed out\n", "module_stdout": "", "msg": "MODULE FAILURE", "parsed": false}

could you please help me.

another geek
  • 361
  • 4
  • 15

1 Answers1

0

You don't have to set wait: no. Use this syntax and it will work.

- ec2_ami:
    aws_access_key: xxxxxxxxxxxxxxxxxxxxxxx
    aws_secret_key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    instance_id: i-xxxxxx
    wait: yes
    name: newtest
    tags:
      Name: newtest
      Service: TestService
  register: instance
Piyush Patil
  • 14,512
  • 6
  • 35
  • 54