Commit Graph

12 Commits

Author SHA1 Message Date
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 6b1c9e95b6 Fix linter errors and update tests
This patch fixes linter errors, updates tests, and adds the MTUBytes
interface configuration option to the systemd .network file to support
live MTU changes upon restart of systemd-networkd. Without it, MTU
changes will only be effective upon boot (might only affect Focal).

Change-Id: I05da4036b0ddc3fb88ba958f413a32fa6819de61
2020-10-28 12:34:10 -05:00
Marc Gariepy 15a0be8cbb remove ansible_python_interpreter
ansible_python_interpreter is now set to auto in the tests repo.
it doesn't need to be overwritten in the test anymore.

Depends-On: https://review.opendev.org/734676/
Change-Id: I5c5eba38917254187a5b006fd810977ee48ec023
2020-06-11 15:58:56 -04:00
Michael Vollman 242b3c3fb4 Add ipforward option to configure IPForward
Add ipforward bool optional setting to systemd_networks to enable
or disable forwarding for a given interface.  IPForward is disabled
by default.

Change-Id: Iaea33b1bdde1964f38612ab8c278fed4985d390b
2019-02-11 09:55:26 -05:00
Kevin Carter 2921156fd1 Move link options to a link file
The link options being set within the network files, which functional,
does not expose all of the link capabilities we have within a specific
link file. This change implements link files per network interface
giving the user the ability to customize links as they need.

Change-Id: Ie999c541a6a566141e81c6d9f95b8a30bbbefa8c
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2018-12-27 21:31:16 -06:00
Jesse Pretorius 1bb6c23ab0 Set container_name as host_var in test inventory
The connection plugin no longer falls back on using the
inventory_hostname as the container_name. Set container_name as a host
var for each container in the test inventory.

In this role's case there are no containers, so I've just removed
the group_var so that the test setup is uniform with other roles
which do use containers.

Change-Id: Ifde552c38d219ede46f3c4c8091e38048205d02f
2018-10-22 11:10:27 +00:00
Kevin Carter a04e0b6989
Remove pause to fix upstream bug
Effectively the pause module requires ncurses, while the tests are using
the pause module, and that's nice to have it's not required.

See issue [0] for more information.

[0] https://github.com/ansible/ansible/issues/42004

Change-Id: I172d161c4cf55741982ca8ced36a59407c70ba99
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2018-07-02 13:32:08 -05:00
Kevin Carter b0395c727e Update cleanup process and set a file prefix
The interface cleanup was generating a script that could be used to run
a cleanup whenever required. While this worked it would rapidly become
out of date, especially when multiple roles are calling this role. This
change adds a prefix which deployer can use to ensure the network
interface files are marked which will ensure we're limiting the
possibility of collisions.

The cleanup process will now use this prefix to search for and remove
any network interface file that matches the given prefix.

Change-Id: Ife5c179d27925cd2e71d3d086a731e6c13b12965
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2018-05-19 05:40:48 +00: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
Jesse Pretorius 7d22c05796 Update run_tests.sh and remove tests-repo-clone.sh
The lint tests make use of the common linters test
used by the roles, so we need to ensure that the
run_tests.sh script is updated and the configuration
adjusted accordingly.

Change-Id: Ib03f81178b421b991ccb7b8e18ac1f13fd725768
2018-03-27 23:11:57 +01:00
Logan V cebf3b3482
Add base role tests
Depends-On: https://review.openstack.org/#/c/554402/
Change-Id: I3b270cc65aedaf9ef7375289b0ff7373b2c8d705
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2018-03-21 00:18:24 -05:00
Kevin Carter dd82b31ee2
first commit
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2018-03-13 23:09:48 -05:00