Ansible: create Amazon ec2 instance

From wikieduonline
Revision as of 13:53, 12 April 2021 by Welcome (talk | contribs)
Jump to navigation Jump to search

#!/usr/bin/env ansible-playbook 

- hosts: localhost
  become: yes

  tasks:
    - amazon.aws.ec2:
       key_name: mykey
       instance_type: t2.micro
       image: ami-123456
       wait: yes
       group: webserver
       count: 3
       vpc_subnet_id: subnet-29e63245
       assign_public_ip: yes


Related terms

See also

Advertising: