Skip to content

Commit

Permalink
docs: Add a "Creating derived configs" section
Browse files Browse the repository at this point in the history
  • Loading branch information
cgwalters committed Jul 27, 2021
1 parent 6ff2b19 commit 2afa1c1
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions docs/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,49 @@ systemd:
WantedBy=multi-user.target
```

### Creating derived configs

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.

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.

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.

<!-- butane-config -->
```yaml
variant: fcos
version: 1.1.0
ignition:
config:
merge:
- local: base.ign
files:
- path: /etc/hostname
contents:
inline: foo.example.com
```

<!-- butane-config -->
```yaml
variant: fcos
version: 1.1.0
ignition:
config:
merge:
- local: base.ign
files:
- path: /etc/hostname
contents:
inline: bar.example.com
```

[spec]: specs.md
[dropins]: https://www.freedesktop.org/software/systemd/man/systemd.unit.html#Description
[fcos-auth-docs]: https://docs.fedoraproject.org/en-US/fedora-coreos/authentication

0 comments on commit 2afa1c1

Please sign in to comment.