lundi 24 août 2015

Failed Create Launch Config with Ansible

I've try to create new Launch Config at AWS with ansible after new AMI create, here's my script playbook :

- hosts: localhost
  tasks:
  - name: create AMI
    ec2_ami:
      region: "ap-southeast-x"
      instance_id: "i-xxxxxx"
      name: "My AMI {{ ansible_date_time.date }} {{ ansible_date_time.hour }}-{{ ansible_date_time.minute }}"
      wait: yes
      state: present
    register: ami

  - name: create LC
    ec2_lc:
      name: "My LC {{ ansible_date_time.date }} {{ ansible_date_time.hour }}-{{ ansible_date_time.minute }}"
      image_id: "{{ ami.image_id }}"
      key_name: "my_key"
      security_groups: "sg-xxxx"
      instance_type: t2.medium
    register: lcnew

but when i try to run, i've got this message :

ERROR: ec2_lc is not a legal parameter in an Ansible task or handler




Aucun commentaire:

Enregistrer un commentaire