This patch implements an Ansible interface to os-net-config.
* os_net_config module; which is in charge of running os-net-config
tool. It supports a few options now (from os-net-config CLI):
- cleanup, to cleanup unconfigured interfaces
- config_file, to specify the os-net-config configuration file
- debug, to enable debug level logging
- detailed_exit_codes, to exit os-net-config with code 2 if files were
modified. Note: the module will still return rc 0 if no error
otherwise Ansible pukes.
- safe_defaults, which will try to apply safe defaults if the provided
configuration failed to execute. It'll basically run dhcp on all
discovered interfaces.
The module returns "rc" as the return code.
The module has molecule testing, and we re-use the same script to
generate safe defaults for os-net-config.
* update tripleo_network_config role; in charge of TripleO Network
configuration.
- Adding tripleo_network_config_legacy_script parameter, true by
default so the legacy shell script is run.
- Adding tripleo_network_config_safe_defaults since some network
configs don't need default safe defaults.
- Updating main, to run the newly created os_net_config module if
tripleo_network_config_legacy_script is False.
- New playbook, os_net_config.yml, running os-net-config with the
provided config.
Change-Id: I1d0f1ab91c9cf290f70a554bfca9b508afc2c34a
Adds an ansible plug-in that can process the input
in THT parameter 'NetConfigDataLookup' used for the
OsNetConfigMappings resource in tripleo-heat-templates.
Add tasks in the tripleo_network_config role to call the
plug-in and write the result into the default mapping
file for os-net-config.
Change-Id: I968771376cdb3cd2e8e576a4de226b1eccebb23a
Blueprint: bp/nova-less-deploy
Port the NetworkConfig logic out of THT/common/deploy-steps.j2 to a role
that we can molecule test and improve.
Change-Id: Iab1e98d4cc3eb53da5fe17cea418b1b555bb8263