Created
April 13, 2015 09:57
-
-
Save sjourdan/d68a3fa6169e49116596 to your computer and use it in GitHub Desktop.
cloud-init with Chef provisionning + register
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 | |
users: | |
- name: demo | |
sudo: ['ALL=(ALL) NOPASSWD:ALL'] | |
groups: sudo | |
shell: /bin/bash | |
chef: | |
install_type: "omnibus" | |
omnibus_url: "https://www.opscode.com/chef/install.sh" | |
force_install: false | |
server_url: "https://api.opscode.com/organizations/cloudinit" | |
node_name: "cloudinit-lala" | |
validation_name: "cloudinit-validator" | |
validation_key: | | |
-----BEGIN RSA PRIVATE KEY----- | |
MIIEpQIBAAKCAQEAqAKSmwTJonSpYZfjkIHMCypK1adiawYyM9et/sFnp7csXwiu | |
... | |
-----END RSA PRIVATE KEY----- | |
output: {all: '| tee -a /var/log/cloud-init-output.log'} | |
runcmd: | |
- while [ ! -e /usr/bin/chef-client ]; do sleep 5; done; chef-client | |
disable_ec2_metadata: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There is an omnibus version parameter as per https://gist.github.com/RichardBronosky/50caf2f91362a5ce3ff3b03e1513e8e0#file-user-data-txt-L104