-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: clear net config from initrd via NM config
- Loading branch information
1 parent
220f11e
commit 0330316
Showing
13 changed files
with
80 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
--- | ||
- name: Deploy network flushing script | ||
template: | ||
src: nbde_client-network-flush.j2 | ||
dest: /usr/bin/nbde_client-network-flush | ||
mode: '0755' | ||
|
||
- name: Deploy network flushing service | ||
template: | ||
src: nbde_client-network-flush.service.j2 | ||
dest: /etc/systemd/system/nbde_client-network-flush.service | ||
mode: '0644' | ||
|
||
- name: Create a directory for nbde_client dracut network flushing module | ||
file: | ||
path: /usr/lib/dracut/modules.d/60nbde_client/ | ||
state: directory | ||
mode: '0755' | ||
|
||
- name: Deploy nbde_client dracut network flushing module | ||
template: | ||
src: "{{ item }}" | ||
dest: >- | ||
/usr/lib/dracut/modules.d/60nbde_client/{{ item | splitext | first }} | ||
mode: '0644' | ||
loop: | ||
- module-setup.sh.j2 | ||
- nbde_client-hook.sh.j2 | ||
|
||
- name: Prepare for network flushing - reset autoconnect-priority | ||
ansible.builtin.command: | ||
cmd: /usr/bin/nbde_client-network-flush reset-autoconn-prio | ||
register: __nbde_client_autoconn_prio | ||
changed_when: __nbde_client_autoconn_prio.stderr | ||
|
||
- name: Reload systemd config | ||
systemd: | ||
daemon_reload: true | ||
|
||
- name: Enable network flushing service | ||
service: | ||
name: nbde_client-network-flush.service | ||
enabled: true | ||
|
||
# vim:set ts=2 sw=2 et: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
- name: Deploy NetworkManager configuration | ||
template: | ||
src: NetworkManager.conf.j2 | ||
dest: /etc/NetworkManger/conf.d/00-nbde_client.conf | ||
mode: '0644' | ||
|
||
# vim:set ts=2 sw=2 et: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# nbde_client NetworkManager config | ||
{{ ansible_managed | comment }} | ||
{{ "system_role:nbde_client" | comment(prefix="", postfix="") }} | ||
[device] | ||
keep-configuration=no | ||
allowed-connections=except:origin:nm-initrd-generator |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters