43253/playbook-to-start-ec2-instance
- name: Create an ec2 instance hosts: web gather_facts: false vars: region: us-east-1 instance_type: t2.micro ami: ami-05ea7729e394412c8 keypair: priyajdm tasks: - name: Create an ec2 instance ec2: aws_access_key: '********************' aws_secret_key: '****************************************' key_name: "{{ keypair }}" group: launch-wizard-26 instance_type: "{{ instance_type }}" image: "{{ ami }}" wait: true region: "{{ region }}" count: 1 vpc_subnet_id: subnet-02f498e16fd56c277 assign_public_ip: yes register: ec2
You could try this and have a look at this blog for better understanding.
I have a playbook that starts an ...READ MORE
Hey @Kiara, your indentation is very wrong. ...READ MORE
Hey, @Kishore, try something like this: - hosts: ...READ MORE
Hi@akhtar, Ansible has one module named ec2. This ...READ MORE
Hey @nmentityvibes, you seem to be using ...READ MORE
It can work if you try to put ...READ MORE
Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE
When you use docker-compose down, all the ...READ MORE
Hey @Ruth, you could use a playbook, ...READ MORE
Try this: - name: Set up multiple authorized ...READ MORE
OR
At least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
Already have an account? Sign in.