Add a simple script for starting an instance
authorLorin Hochstein <lhochstein@netflix.com>
Sun, 12 Feb 2017 21:36:58 +0000 (13:36 -0800)
committerLorin Hochstein <lhochstein@netflix.com>
Sun, 12 Feb 2017 21:36:58 +0000 (13:36 -0800)
ch12/playbooks/start-instance.yml [new file with mode: 0644]

diff --git a/ch12/playbooks/start-instance.yml b/ch12/playbooks/start-instance.yml
new file mode 100644 (file)
index 0000000..2f0d345
--- /dev/null
@@ -0,0 +1,16 @@
+- name: start an instance with the packered ami
+  hosts: localhost
+  gather_facts: False
+  tasks:
+    - name: start the instance
+      ec2:
+        region: us-west-1
+        image: ami-42ffa322
+        instance_type: t2.micro
+        key_name: mykey
+        group: [web, ssh, outbound]
+        instance_tags:
+          Name: packer test
+      register: result
+    - debug: var=result
+