From https://git.launchpad.net/cloud-init/tree/config/cloud.cfg (thanks to garbelini)
(As of Sep 2017 the above link is incorrect and is now https://git.launchpad.net/cloud-init/tree/config/cloud.cfg.tmpl, see note below)
# The modules that run in the 'init' stage
cloud_init_modules:
- migrator
- ubuntu-init-switch
- seed_random
- bootcmd
- write-files
- growpart
- resizefs
- set_hostname
- update_hostname
- update_etc_hosts
- ca-certs
- rsyslog
- users-groups
- ssh
# The modules that run in the 'config' stage
cloud_config_modules:
# Emit the cloud config ready event
# this can be used by upstart jobs for 'start on cloud-config'.
- emit_upstart
- disk_setup
- mounts
- ssh-import-id
- locale
- set-passwords
- snappy
- grub-dpkg
- apt-pipelining
- apt-configure
- package-update-upgrade-install
- fan
- landscape
- timezone
- lxd
- puppet
- chef
- salt-minion
- mcollective
- disable-ec2-metadata
- runcmd
- byobu
# The modules that run in the 'final' stage
cloud_final_modules:
- rightscale_userdata
- scripts-vendor
- scripts-per-once
- scripts-per-boot
- scripts-per-instance
- scripts-user
- ssh-authkey-fingerprints
- keys-to-console
- phone-home
- final-message
- power-state-change
Additionally:
There is configuration merging "The order is the following:
- cli config files override environment config files
which override instance configs which override datasource
configs which override base configuration which overrides
default configuration." (see Changelog)
Within the individual generated script directories the scripts are run in the order given by the python "sorted()" builtin
NOTE: although this was correct at the time of answering, looking at the respository (as of Sept 2017) mentioned above there is now a cloud.cfg.tmpl template file which has slightly different settings for different distros
# The modules that run in the 'init' stage
cloud_init_modules:
- migrator
- seed_random
- bootcmd
- write-files
- growpart
- resizefs
{% if variant not in ["freebsd"] %}
- disk_setup
- mounts
{% endif %}
- set_hostname
- update_hostname
{% if variant not in ["freebsd"] %}
- update_etc_hosts
- ca-certs
- rsyslog
{% endif %}
- users-groups
- ssh
# The modules that run in the 'config' stage
cloud_config_modules:
{% if variant in ["ubuntu", "unknown", "debian"] %}
# Emit the cloud config ready event
# this can be used by upstart jobs for 'start on cloud-config'.
- emit_upstart
- snap_config
{% endif %}
- ssh-import-id
- locale
- set-passwords
{% if variant in ["rhel", "fedora"] %}
- spacewalk
- yum-add-repo
{% endif %}
{% if variant in ["ubuntu", "unknown", "debian"] %}
- grub-dpkg
- apt-pipelining
- apt-configure
{% endif %}
{% if variant not in ["freebsd"] %}
- ntp
{% endif %}
- timezone
- disable-ec2-metadata
- runcmd
{% if variant in ["ubuntu", "unknown", "debian"] %}
- byobu
{% endif %}
# The modules that run in the 'final' stage
cloud_final_modules:
{% if variant in ["ubuntu", "unknown", "debian"] %}
- snappy
{% endif %}
- package-update-upgrade-install
{% if variant in ["ubuntu", "unknown", "debian"] %}
- fan
- landscape
- lxd
{% endif %}
{% if variant not in ["freebsd"] %}
- puppet
- chef
- salt-minion
- mcollective
{% endif %}
- rightscale_userdata
- scripts-vendor
- scripts-per-once
- scripts-per-boot
- scripts-per-instance
- scripts-user
- ssh-authkey-fingerprints
- keys-to-console
- phone-home
- final-message
- power-state-change
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…