Skip to content

Instantly share code, notes, and snippets.

View benileo's full-sized avatar

Ben Irving benileo

  • Nelson, BC Canada
  • 18:28 (UTC -07:00)
View GitHub Profile
#!/bin/bash -ex
AMI_ID=ami-efd0428f
PROFILE=jammin
REGION=us-west-2
USER_DATA=$(mktemp)
TYPE="t2.micro"
DRY_RUN=""
write-mime-multipart --output=$USER_DATA \
#cloud-config
#vim: syntax=yaml
manage_etc_hosts: localhost
fqdn: blackberry.alltree.ca
groups:
docker
swap:
@benileo
benileo / cloud-init-success.yaml
Created June 11, 2017 18:48
Ansible, cloud init has completed successfully
- name: Ensuring that cloud init has complete.
hosts: "Enter your hosts here"
tasks:
- stat:
path: /var/lib/cloud/instance/boot-finished
register: st
- fail:
msg: "/var/lib/cloud/instance/boot-finished does not exist; Cloud init has not complete"
when: st.stat.exists == False