File tree Expand file tree Collapse file tree 5 files changed +27
-14
lines changed
roles/edpm_network_config Expand file tree Collapse file tree 5 files changed +27
-14
lines changed Original file line number Diff line number Diff line change @@ -19,10 +19,14 @@ This Ansible role does the following tasks:
1919 - Checks for the presence of required RPMS
2020 - Uses "provider" ifcfg/nmstate based on flag "edpm_network_config_nmstate"
2121
22- Note: By default this role will cleanup devices/interfaces not in
23- "edpm_network_config_template". If there is requirement to keep them
24- for pre-provisioned nodes, "edpm_network_config_nonconfigured_cleanup"
25- ansible var can be set to "false".
22+ Note: * With nmstate-provider as the default for os-net-config,
23+ "os-net-config --cleanup" should be used only for very
24+ specific use case, eg
25+ - SSH provisioned over VLAN-tagged single interface
26+ - os-net-config needs to override ctlplane over bond+VLAN
27+
28+ * "os-net-config --cleanup" SHOULD NOT be set for update/adoption
29+ use case
2630
2731Here is an example playbook to run os-net-config tool:
2832
Original file line number Diff line number Diff line change 3939requirements:
4040 - os-net-config
4141description:
42- - Configure host network interfaces using a JSON config file format.
42+ - Configure host network interfaces using a YAML/ JSON config file format.
4343options:
4444 cleanup:
4545 description:
46- - Cleanup unconfigured interfaces.
46+ - Cleanup unconfigured interfaces, before applying .
4747 type: bool
4848 default: false
4949 config_file:
6969 default: false
7070 use_nmstate:
7171 description:
72- - If enabled , use nmstate and network manager for network configuration.
72+ - If disabled , use legacy ifcfg/ network-scripts for network configuration.
7373 type: bool
74- default: false
74+ default: true
7575"""
7676
7777EXAMPLES = """
Original file line number Diff line number Diff line change @@ -54,8 +54,8 @@ edpm_network_config_safe_defaults: false
5454edpm_network_config_template : " "
5555edpm_bond_interface_ovs_options : " bond_mode=active-backup"
5656edpm_dns_search_domains : []
57- edpm_network_config_nonconfigured_cleanup : true
5857# Control resolv.conf management by NetworkManager
5958# false = disable NetworkManager resolv.conf update (default)
6059# true = enable NetworkManager resolv.conf updat
6160edpm_bootstrap_network_resolvconf_update : " {{ edpm_network_config_nmstate | default(True) }}"
61+ edpm_network_config_nonconfigured_cleanup : false
Original file line number Diff line number Diff line change @@ -81,8 +81,16 @@ argument_specs:
8181 default : nic1
8282 edpm_network_config_nonconfigured_cleanup :
8383 type : bool
84- description : " Cleanup network interfaces not in network config"
85- default : true
84+ description : >
85+ Cleanup interfaces not defined in the network configa.
86+ Usage:
87+ - If there are any ifcfg/nm interfaces which you need to clean
88+ before applying the desired config, set this flag to 'true'
89+ - During network_update, if cleanup is needed for any interfaces
90+ Warning!
91+ - Cleanup of ssh interface might result in connectivity loss
92+ - Cleanup of DPDK/SR-IOV interfaces is not supported
93+ default : false
8694 edpm_bootstrap_network_resolvconf_update :
8795 type : bool
8896 default : true
Original file line number Diff line number Diff line change 1414# License for the specific language governing permissions and limitations
1515# under the License.
1616
17-
1817- name : Converge
1918 hosts : all
2019 gather_facts : false
3029 state: up
3130 ipv4:
3231 address:
33- - ip: 192.168.180.2
34- prefix-length: 24
32+ - ip: 192.168.180.2
33+ prefix-length: 24
3534 dhcp: false
3635 enabled: true
36+ ipv6:
37+ enabled: false
3738 roles :
3839 - role : osp.edpm.edpm_network_config
You can’t perform that action at this time.
0 commit comments