Ignition configuration options
You can configure various system aspects by using Ignition configuration sections. Follow these guidelines to ensure correct configuration syntax and structure.
- Configuration format
-
Ignition uses the JSON format for configurations. The standard workflow uses Butane (YAML) for human-readable authoring, then converts to Ignition JSON.
Converting Butane to Ignition
$ butane --strict config.bu > config.ignTable 1. Ignition configuration sections Section Purpose ignitionSpecifies the configuration version and optional remote configuration sources.
storageDefines files, directories, links, disks, file systems, and RAID arrays.
passwdConfigures users and groups.
systemdManages
systemdunits (enable, disable, mask, or provide unit contents).kernel_argumentsModifies kernel command line parameters for subsequent boots.
- Storage configuration
-
The
storagesection supports the following resources:Table 2. Storage section resources Resource Description Example use case filesCreate or overwrite files with specified contents, mode, and ownership.
Configuration files, scripts
directoriesCreate directories with specified mode and ownership.
Log directories, application data
linksCreate symbolic or hard links.
Alternative paths, compatibility
disksPartition disks by using GPT.
Data partitions
filesystemsCreate and format file systems.
Additional storage volumes
raidConfigure software RAID arrays.
Redundant storage
- File configuration example
-
storage: files: - path: /etc/resolv.conf mode: 0644 contents: inline: | ... - path: /etc/chrony.conf # <-- same level as first entry mode: 0644 - User configuration
-
passwd: users: - name: admin uid: 1001 groups: - wheel - sudo ssh_authorized_keys: - ssh-rsa AAAAB3... admin@example.com password_hash: $6$rounds=4096$salt$hash... - name: appuser uid: 1002 system: true no_create_home: true - Systemd unit configuration
-
systemd: units: - name: myapp.service enabled: true contents: | [Unit] Description=My Application After=network-online.target [Service] Type=simple ExecStart=/usr/bin/myapp Restart=always [Install] WantedBy=multi-user.target - name: debug-shell.service mask: true - Kernel arguments
-
kernel_arguments: should_exist: - systemd.unified_cgroup_hierarchy=1 - mitigations=auto should_not_exist: - quiet - Multi-data-center configuration example
-
When managing systems across multiple data centers, create environment-specific configurations:
variant: r4e version: 1.5.0 storage: files: - path: /etc/resolv.conf mode: 0644 contents: inline: | nameserver 10.1.0.1 nameserver 10.1.0.2 search dc1.example.com example.com - path: /etc/chrony.conf mode: 0644 contents: inline: | server ntp.dc1.example.com iburst prefer server ntp.example.com iburst driftfile /var/lib/chrony/drift - path: /etc/datacenter mode: 0644 contents: inline: dc1 - Configuration validation
-
You can validate Ignition configurations before deployment:
$ ignition-validate config.ignAlternatively, you can use Butane’s strict mode during conversion:
$ butane --strict config.bu > config.ign