============================ Role - edpm_network_config ============================ Usage ~~~~~ This Ansible role does the following tasks: * Read the configured edpm_network_config_tool The following choices can be used to configure the host network: - nmstate, i.e based on systemroles.network - os-net-config, i.e based on custom tasks os-net-config is the default tool for this role * For os-net-config option, this role prepares the host by - creating necessary folders and files for rendering network templates and NIC mappings (optional) - Checks for the presence of required RPMS - Uses "provider" ifcfg/nmstate based on flag "edpm_network_config_nmstate" Note: * With nmstate-provider as the default for os-net-config, using "edpm_network_config_nonconfigured_cleanup" is not recommended. Instead, enabling flag "edpm_network_config_remove_config" with appropriate remove_config section added in "edpm_network_config_template" is the supported option * "edpm_network_config_nonconfigured_cleanup" SHOULD NOT be set for update/adoption usecase Here is an example playbook to run os-net-config tool: .. code-block:: YAML - name: Apply network_config block: - name: Configure host network with edpm-ansible include_role: name: edpm_network_config vars: edpm_network_config_template: "{{ nic_config_file }}" .. literalinclude:: ../../../roles/edpm_network_config/tasks/os_net_config.yml :language: YAML Here is an example playbook to run os-net-config tool with --remove_config section: .. code-block:: YAML - name: Cleanup and apply network configuration only include_role: name: edpm_network_config vars: edpm_network_config_template: "{{ nic_config_file }}" edpm_network_config: remove_config: true An example of using ``remove_config`` is available in: .. literalinclude:: ../../../roles/edpm_network_config/molecule/default/converge.yml :language: YAML