Skip to content

Commit 98d6e39

Browse files
committed
1 parent 6ff2b19 commit 98d6e39

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

docs/examples.md

+23
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,29 @@ systemd:
374374
WantedBy=multi-user.target
375375
```
376376

377+
## Creating derived configs
378+
379+
A common scenario will be to have a "base" Ignition config, and then you want to create machine-specific versions that e.g. contain static IP addressing or a static `/etc/hostname`, etc.
380+
381+
Another common scenario is to have a pool of bare metal machines where some have e.g. SATA disks, other newer machines have NVMe drives, etc.
382+
383+
In the following, the `base.ign` is an Ignition config file you have locally. It could be generated via whatever mechanism you prefer (could also be butane, or not). These examples just change the value of `/etc/hostname`, but everything above (storage configuration etc.) can be added too.
384+
385+
<!-- butane-config -->
386+
```yaml
387+
variant: fcos
388+
version: 1.1.0
389+
ignition:
390+
config:
391+
merge:
392+
- local: base.ign
393+
storage:
394+
files:
395+
- path: /etc/hostname
396+
contents:
397+
inline: foo.example.com
398+
```
399+
377400
[spec]: specs.md
378401
[dropins]: https://www.freedesktop.org/software/systemd/man/systemd.unit.html#Description
379402
[fcos-auth-docs]: https://docs.fedoraproject.org/en-US/fedora-coreos/authentication

test

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ mkdir tmpdocs
2727
trap 'rm -r tmpdocs' EXIT
2828
# Create files-dir contents expected by configs
2929
mkdir -p tmpdocs/files-dir/tree
30-
touch tmpdocs/files-dir/{config.ign,ca.pem,file,file-epilogue,local-file3}
30+
touch tmpdocs/files-dir/{base.ign,config.ign,ca.pem,file,file-epilogue,local-file3}
3131

3232
for doc in docs/*md
3333
do

0 commit comments

Comments
 (0)