Created
November 2, 2017 16:41
-
-
Save pittjl/3a334d6539d518e79f2671ac4bbbe66d to your computer and use it in GitHub Desktop.
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
#!/bin/bash -eux | |
yum install -y cloud-init cloud-utils-growpart dracut-modules-growroot | |
cat >/etc/cloud/cloud.cfg <<-'EOF' | |
users: | |
- default | |
disable_root: 1 | |
ssh_pwauth: 0 | |
locale_configfile: /etc/sysconfig/i18n | |
mount_default_fields: [~, ~, 'auto', 'defaults,nofail', '0', '2'] | |
resize_rootfs_tmp: /dev | |
ssh_deletekeys: 0 | |
ssh_genkeytypes: ~ | |
syslog_fix_perms: ~ | |
cloud_init_modules: | |
- bootcmd | |
- write-files | |
- resizefs | |
- set_hostname | |
- update_hostname | |
- update_etc_hosts | |
- rsyslog | |
- users-groups | |
- ssh | |
cloud_config_modules: | |
- mounts | |
- locale | |
- set-passwords | |
- timezone | |
- runcmd | |
cloud_final_modules: | |
- scripts-per-once | |
- scripts-per-boot | |
- scripts-per-instance | |
- scripts-user | |
- ssh-authkey-fingerprints | |
- keys-to-console | |
- final-message | |
system_info: | |
distro: rhel | |
default_user: | |
name: ec2-user | |
paths: | |
cloud_dir: /var/lib/cloud | |
templates_dir: /etc/cloud/templates | |
ssh_svcname: sshd | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment