Skip to content

Commit

Permalink
Allow initrd configuration to be skipped
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMysteriousX committed Jun 22, 2024
1 parent fd629e1 commit 8c74bf4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ These are the variables that can be passed to the role:
|----------|-------------|------|
| `nbde_client_provider` | `clevis`| identifies the provider for the `nbde_client` role. We currently support `clevis`.|
| `nbde_client_bindings` | | a list containing binding configurations, which include e.g. devices and slots. |
| `nbde_client_early_boot` | `true` | by default nbde_client will configure the initrd to unlock the volume. This may need to be disabled if the managed host is using static IP addressing, or if the volume should be unlocked by clevis-luks-askpass |

### nbde_client_bindings

Expand Down
3 changes: 3 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
# The provider for nbde_client role. Currently 'clevis' is supported.
nbde_client_provider: clevis

# Deploy mechanisms for opening the volume on boot
nbde_early_boot: true

# nbde_client_bindings is a list of dictionary. Please refer to the README
# for details on the supported keys.

Expand Down
5 changes: 4 additions & 1 deletion tasks/main-clevis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
dest: /etc/dracut.conf.d/nbde_client.conf
owner: root
mode: '0444'
when: nbde_client_early_boot

- name: Check whether devices are at the desired state
when:
Expand Down Expand Up @@ -82,6 +83,8 @@

- name: Deploy mechanism to clear network configuration generated during early boot
include_tasks: clear_initrd_netcfg-{{ __nbde_client_clear_initrd_netcfg_strategy }}.yml
when: __nbde_client_clear_initrd_netcfg_strategy is defined
when:
- __nbde_client_clear_initrd_netcfg_strategy is defined
- nbde_client_early_boot

# vim:set ts=2 sw=2 et:

0 comments on commit 8c74bf4

Please sign in to comment.