Cloud config examples library - cloud-init 25.1.2 documentation (original) (raw)
Note
This page is an index to all the cloud config YAML examples, organized by operation or process. If you prefer to use a single-page summary containing every cloud config yaml example, refer to theall examples page.
System initialization and boot¶
- Run commands during boot using
bootcmd
andruncmd
- Control vendor-data use on boot
- Provide random seed data
- Writing out arbitrary files
System configuration¶
SSH and security¶
- Configure SSH and SSH keys
There are four modules related to SSH keys and their configuration, all of which are described in this page: - Add and configure trusted CA certificates
- Disable AWS EC2 IMDS
Disk and file system setup¶
- Configure partitions and filesystems - this includes initial disk and filesystem setup, resizing the file system, and growing partitions
- Configure mount points and swap files
- Gluster
Manage users¶
Hostname¶
Networking¶
- Configure Network Time Protocol (NTP)
- Configure resolv.conf
- Configure Wireguard tunnel
- Update the hosts file
Package management¶
- Update, upgrade and install packages
- Configure APT
- APT pipelining
- Configure APK repositories (Alpine)
- Manage snaps (Ubuntu)
- Yum repositories (RPM-based)
- Configure Zypper repositories (OpenSUSE)
System monitoring and logging¶
- Create Reporting endpoints
- Output message when cloud-init finishes
- Configure system logging via rsyslog
Configuration managers¶
Ansible
- Install Ansible
- Configure instance to be managed by Ansible
- Configure instance to be an Ansible controller
Chef
Puppet
Salt Minion
Distribution-specific setup¶
Red Hat¶
Ubuntu¶
- Configure Ubuntu Pro services
- Third party drivers in Ubuntu
- Install Landscape client
- Configure Ubuntu fan networking
- Configure which device is used asthe target for GRUB installation