amazon ec2 - ansible ec2 running list needs to be a list of instances -
i'm trying deploy ec2 instances ansible.
i keep getting error says:
failed! => {"msg": "running list needs list of instances run: none",
site.yml
--- - hosts: hornet user: root sudo: false gather_facts: false serial: 1 roles: - role: ec2
roles/ec2/tasks/main.yml
--- - include_vars: "env.yml" - name: create ec2 instance local_action: module: ec2 key_name: "{{ key_name }}" region: "{{ region }}" instance_type: "{{ instance_type }}" image: "{{ image }}" group_id: "{{ security_group }}" wait: yes private_ip: "{{ privip }}" assign_public_ip: true state: running instance_tags: { "{{ ectags }}","name: {{ inventory_hostname }}"} count: 1 register: basic_ec2
i have 2 hosts in hosts file.
[hornet] awo-p01-hm02 privip=`uniqueip` ectags="{purpose:hornetmq}" awo-p01-hm03 privip=`uniqueip` ectags="{purpose:hornetmq}"
i suspect want state: present
. state: running
starting existing instances (that pass instance_ids: [ ... ]
).
horribly confusing , poorly documented, know. ec2 module tries many things. :(
Comments
Post a Comment