Created
March 15, 2019 09:46
-
-
Save markuman/922b3e00b7d2de3448793181fa76d170 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: localhost | |
connection: local | |
gather_facts: False | |
tasks: | |
- name: Launch the new EC2 Instance | |
ec2: | |
... | |
register: instance | |
- name: Wait for SSH to come up | |
delegate_to: "{{ instance.instances[0].private_ip_address }} " | |
wait_for_connection: | |
delay: 60 | |
timeout: 320 | |
- hosts: "{{ tag_name }}" | |
gather_facts: True | |
become: True | |
tasks: | |
- name: Configure instance(s) | |
hosts: | |
yum: | |
name: "{{ packages }}" | |
vars: | |
packages: | |
- docker | |
- htop | |
- nano | |
- python3 | |
- python3-pip | |
- mariadb | |
- ncdu | |
- nmap | |
- screen |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment