unable to set spot block duration using wait: true and wait_time in ansible

4 views
Skip to first unread message

Nilesh Devare

unread,
Jun 15, 2017, 1:36:37 PM6/15/17
to Ansible Project
unable to set spot block duration using wait: true and wait_time in ansible  






- hosts: localhost
  connection: local
  gather_facts: false

  tasks:
  - name: launch spot instance
    ec2:
      spot_price: 0.052
      region: us-east-1
      keypair: test
      group_id: sg-5789654
      instance_type: c3.large
      instance_tags:
              Name: common
              Env: Test
              Owner: mi
              Role: don
              Stack: tem
              Client: test
      count: 1
      image: ami-216a898547
      wait: true
      wait_timeout: 60
      vpc_subnet_id: subnet-64cf8908
      assign_public_ip: no
    register: newinstance

  - name: allocate and associate a new elastic IP inside a VPC
    ec2_eip:
      region: us-east-1
      in_vpc: yes
      instance_id: "{{ newinstance.instance_ids[0] }}"
    register: instance_eip
  - debug: var=instance_eip.public_ip
Reply all
Reply to author
Forward
0 new messages