Update initramfs when links change
In order to make the default link take effect initramfs needs to be updated. This change also updates the default link to use the recommended defaults from the systemd-networkd documentation. Default link config: - https://www.freedesktop.org/software/systemd/man/systemd.link.html#Examples See this thread for bug info: - https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=793374 Change-Id: I5430da4acad1e36b7593ad6791afbebf9e730bba Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This commit is contained in:
parent
25048240b4
commit
d8bcdc0341
@ -22,3 +22,6 @@
|
||||
- systemd_run_networkd | bool
|
||||
tags:
|
||||
- systemd-networkd
|
||||
|
||||
- name: Update initramfs
|
||||
command: "{{ systemd_networkd_update_initramfs }}"
|
||||
|
@ -57,6 +57,7 @@
|
||||
config_type: "ini"
|
||||
notify:
|
||||
- Restart systemd-networkd
|
||||
- Update initramfs
|
||||
tags:
|
||||
- systemd-networkd
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
# {{ ansible_managed }}
|
||||
|
||||
[Link]
|
||||
NamePolicy=kernel database onboard slot path
|
||||
MACAddressPolicy=persistent
|
||||
|
@ -15,3 +15,5 @@
|
||||
|
||||
systemd_networkd_distro_packages:
|
||||
- systemd-networkd
|
||||
|
||||
systemd_networkd_update_initramfs: "dracut -f"
|
||||
|
16
vars/suse-42.yml
Normal file
16
vars/suse-42.yml
Normal file
@ -0,0 +1,16 @@
|
||||
---
|
||||
# Copyright 2018, Rackspace US, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
systemd_networkd_update_initramfs: "dracut -f"
|
16
vars/ubuntu-16.04.yml
Normal file
16
vars/ubuntu-16.04.yml
Normal file
@ -0,0 +1,16 @@
|
||||
---
|
||||
# Copyright 2018, Rackspace US, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
systemd_networkd_update_initramfs: "/usr/sbin/update-initramfs -u"
|
Loading…
Reference in New Issue
Block a user