Emilien Macchi a4d205f378 Ansible interface for os-net-config
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

  - 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
2020-09-17 17:13:10 +05:30
defaults Ansible interface for os-net-config 2020-09-17 17:13:10 +05:30
meta Create a role for network config 2020-08-13 09:09:21 -06:00
molecule/default Add os-net-config mappings support 2020-09-03 22:41:59 +02:00
tasks Ansible interface for os-net-config 2020-09-17 17:13:10 +05:30