Commit Graph

11 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov 1e6fc97dbe Fix linters and metadata
With update of ansible-lint to version >=6.0.0 a lot of new
linters were added, that enabled by default. In order to comply
with linter rules we're applying changes to the role.

With that we also update metdata to reflect current state.

Change-Id: I3aa1a19eb1aa735bafb29e5babe433b77a8d1f47
2023-07-12 12:33:19 +02:00
Jonathan Rosser 63ad4cffac Use ansible_facts[] instead of fact variables
See https://github.com/ansible/ansible/issues/73654

Change-Id: I36a098e4b028bdf09b38e2f2c99f68f311ce9d32
2021-02-24 14:26:31 +00:00
Jonathan Rosser 51daac22c6 Do not rebuild initramfs for containers
Containers do not have an initramfs so this is not useful, and fails
for Centos-7 with:

Can't write to /boot: Directory /boot does not exist or is not accessible.

Change-Id: Ibc6ff871ad6984d4e0f29693f4827f57169aef92
2020-05-18 22:01:20 +00:00
Kevin Carter 9f6857f602
Add async to the networkd start task
The async function was added to the restart handler but not the start
task. This change adds the missing async which will ensure we're not
hung on transient networkd starts.

Change-Id: I81a9e578875a43f7581abec0a3bf0c4067ab4d41
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2018-08-18 17:36:50 -05:00
Kevin Carter 3139f56820
Add an async to the networkd restart
When restarting networkd we don't need to wait for the restart to
complete. This change adds an async to speed things up.

Change-Id: I5e038f8a6fc00b476cfc505d8cc30929ba667127
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2018-06-01 19:10:03 -05:00
Kevin Carter b6a4cfe946
Update role so we're not reloading the daemon in excess
The systemd-networkd role was reloading the systemd daemon on every run
this change removes that as this role will not need to modify anything
that requires a daemon reload.

Network facts will be gathered after this role executes which will
ensure any state changes are picked up as soon as they're available.

Change-Id: Ib3efa6a1662da48d0f58e00ed77f725e1a950edb
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2018-05-18 22:16:02 -05:00
Kevin Carter 12ae3acd6e
Add resolved to the networkd setup
If the new variable systemd_resolved is defined, resolved will be setup
within the environment. This will configure the global configuration
file and restart the service.

A test has been added to ensure this code path is exercised on every
commit. It should be noted that suse does not have a resolved package so
this functionality is disabled when a suse system is encountered. This
should be revised as soon as suse has resolved available.

Change-Id: I85278719bc5b7158244fd44c65d4366935555780
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2018-05-10 14:13:27 -05:00
Kevin Carter d8bcdc0341
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>
2018-04-16 07:51:01 -05:00
Logan V d9849f1d37 Implement networkd restart as handler
Change-Id: I1b49cc62d01fe2e3aa5766eea898c771ec6ac3d1
2018-03-19 14:57:05 -05:00
Logan V 920be0306b Remove unused handlers
Change-Id: I901c6aa85d6c155278d68709917a4bd17b58ac8e
2018-03-19 14:56:38 -05:00
Kevin Carter dd82b31ee2
first commit
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2018-03-13 23:09:48 -05:00