Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Samples to create a cloud-init configuration ISO.
$ genisoimage -output seed.iso -volid cidata -joliet -rock user-data meta-data
local-hostname: asvignesh.local
# eth0 is the default network interface enabled in the image. You can
# configure static network settings with an entry like below.
#network-interfaces: |
# iface eth0 inet static
# address
# network
# netmask
# broadcast
# gateway
# vim:syntax=yaml
# A user by the name ec2-user is created in the image by default.
- default
# Following entry create user1 and assigns password specified in plain text.
# Please not use of plain text password is not recommended from security best
# practises standpoint
- name: user1
groups: sudo
plain_text_passwd: < plain text password here >
lock_passwd: false
# Following entry creates user2 and attaches a hashed passwd to the user. Hashed
# passwords can be generated with:
# python -c 'import crypt,getpass; print crypt.crypt(getpass.getpass())'
- name: user2
passwd: < hashed password here >
lock_passwd: false
# Following entry creates user3, disables password based login and enables an SSH public key
- name: user3
- < ssh public key here >
lock_passwd: true
list: |
ec2-user:< plain text password here >
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.