From 53eed2b56034573e575a2d0d0953fd5782e0a1ee Mon Sep 17 00:00:00 2001 From: vcandapp Date: Mon, 2 Dec 2024 17:14:17 +0530 Subject: [PATCH] Update the doc content for edpm_network_config --- .../source/roles/role-edpm_network_config.rst | 33 +++++++++++++++---- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/docs/source/roles/role-edpm_network_config.rst b/docs/source/roles/role-edpm_network_config.rst index 9c18cba09..f6c120104 100644 --- a/docs/source/roles/role-edpm_network_config.rst +++ b/docs/source/roles/role-edpm_network_config.rst @@ -1,10 +1,29 @@ -============================= +============================ Role - edpm_network_config -============================= +============================ -.. note:: - When the `edpm_network_config_tool` is set to `'os-net-config'`, the `ctlplane_gateway_ip` and `ctlplane_ip` - variables must be set on the host. +Usage +~~~~~ -.. include:: - ../collections/osp/edpm/edpm_network_config_role.rst +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 + +* For the latter, prepare to running os-net-config tool in the host + It creates necessary folder/files for rendering the network template + and the NIC mapping (optional) in the host + It also checks for presence of required RPMs + +Here is an example playbook to run os-net-config tool: +.. code-block:: YAML + - name: Run network_config + edpm_os_net_config: + config_file: "{{ nic_config_file }}" + safe_defaults: "{{ edpm_network_config_safe_defaults | bool }}" + use_nmstate: "{{ edpm_network_config_nmstate | bool }}" + +.. literalinclude:: ../../../roles/edpm_network_config/tasks/os_net_config.yml + :language: YAML