Last active
February 12, 2018 14:30
-
-
Save dctrwatson/7206322 to your computer and use it in GitHub Desktop.
Jank way to use instance storage automatically in EC2
This file contains 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
#cloud-config | |
mounts: | |
- [ ephemeral0, /var, ext4, "defaults,noatime", "0", "2" ] | |
- [ swap, null ] | |
bootcmd: | |
- mkdir -p /tmp/root | |
- mount --bind / /tmp/root | |
- rsync -aq /tmp/root/var/lib/cloud /var/lib/ | |
- [ cloud-init-per, instance, rsync_var, rsync, -aq, /tmp/root/var/, /var ] | |
- [ cloud-init-per, instance, restart_cron, service, restart, cron ] | |
cloud_init_modules: | |
- mounts | |
- resizefs | |
- bootcmd | |
- set_hostname | |
- update_hostname | |
- update_etc_hosts | |
- ca-certs | |
- rsyslog | |
- ssh | |
cloud_config_modules: | |
- ssh-import-id | |
- locale | |
- set-passwords | |
- grub-dpkg | |
- apt-pipelining | |
- apt-update-upgrade | |
- landscape | |
- timezone | |
- disable-ec2-metadata | |
- runcmd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment