Last active
August 29, 2015 14:20
-
-
Save dougluce/aa27b77d5490fe640d11 to your computer and use it in GitHub Desktop.
Ansible playbook example -- can env be shared?
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 | |
name: Create a new EC2 instance | |
connection: local | |
gather_facts: False | |
vars_prompt: | |
- name: "env" | |
prompt: "Is this for production or dev" | |
default: "dev" | |
tasks: | |
- name: Display the type of box to create | |
debug: msg="I'll create a new {{ env }} box" | |
- name: Create new host group (with placeholder IP) | |
add_host: hostname=10.0.0.2 groups=ec2host | |
- hosts: ec2host | |
name: Configure a new EC2 instance | |
gather_facts: False | |
tasks: | |
- name: Display the type of box to configure | |
debug: msg="I'll configure a new {{ env }} box" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment